Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
451 views
in Technique[技术] by (71.8m points)

javascript - Primefaces <p:tooltip> does not disappear after another Ajax request

Let's say I have some tooltips in my <p:dataTable>. When I change the page of dataTable and while another page laods, I move mouse on any tooltip - it shows up, but after the other page is loaded tooltip never disappears.. I've tried to update this, using p:ajax, p:remoteCommand but nothing helps, actually this made another Ajax request and tooltips also stucked. Only full page reload F5 works.

Has anyone encountered with such problem? Thanks a lot for your help!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Incase anybody else struggles with this, I think I found a solution worth trying. In my case, I had a tool tip that showed when I hovered over a commandButton but if I clicked it it would run an ajax request and return, update a component and finish but the tooltip would still remain. This is what I did to fix it.

<p:tooltip id="saveDeleteTooltip" globalSelector="[data-tooltip]" position="top" hideEvent="mouseleave click"/>

Supply two events for the hideEvent attribute and seems to recognize and use both. The first is for normal mouseout but the second does fire when I click on my commandButtons it does hide the tooltip like it was supposed to do.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...