Bug 67149

Summary: Tooltip not reflecting updated content set on a timeout
Product: WebKit Reporter: Michael Leibman <mleibman>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, bfulgham, karlcow, mkrp87, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://jsfiddle.net/rCpqu/
Attachments:
Description Flags
Safari 17.4 Reference Video none

Description Michael Leibman 2011-08-29 13:07:56 PDT
What steps will reproduce the problem?
1. Attach an onmouseover event to an element with a 'title' attribute.
2. In the handler, set the timeout to execute a function that will change the 'title' attribute 100ms after the event.
3. Quickly mouse over the edge of the element.  Try to cross the border but not move the mouse around inside the element.

What is the expected result?
System tooltip pops up on hover showing the new tooltip text.


What happens instead?
System tooltip shows the old tooltip text.


Test case:
http://jsfiddle.net/rCpqu/


<div id="myDiv" title="tooltip" style="padding:10px;background:pink">Hover me</div>

var el = document.getElementById('myDiv');


el.onmouseover = function() {
    setTimeout(function() {
        el.title = 'new tooltip';
    }, 150);
}

el.onmouseout = function() {
    el.title = 'tooltip';
}
Comment 1 Ahmad Saleem 2024-03-11 05:21:58 PDT
Marking this as 'New' because at least Firefox Nightly 125 is not showing old tooltip on quick hover while showing consistently `new tooltip` as for Safari 17.4 and Chrome Canary 124, it is reproducible and on quick hover, it do show 'tooltip' instead of 'new tooltip' on time to time basis.

Might be worth to change it from `WebKit Misc` to `Layout & Rendering`?
Comment 2 Karl Dubost 2024-03-11 17:25:55 PDT
Ahmad, 
I guess I do not know how to test this properly, because I get the same behavior everywhere.
Comment 3 Radar WebKit Bug Importer 2024-03-11 17:26:51 PDT
<rdar://problem/124417555>
Comment 4 Ahmad Saleem 2024-03-11 17:30:23 PDT
Created attachment 470306 [details]
Safari 17.4 Reference Video

In reference video, `tooltip` is show when I quickly do hover, while in Firefox even quickly, it does always show `new tooltip` while in Safari, we do go in between `new tooltip` and `tooltip` as show in video.