Bug 67149 - Tooltip not reflecting updated content set on a timeout
Summary: Tooltip not reflecting updated content set on a timeout
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://jsfiddle.net/rCpqu/
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-08-29 13:07 PDT by Michael Leibman
Modified: 2024-03-11 17:30 PDT (History)
7 users (show)

See Also:


Attachments
Safari 17.4 Reference Video (3.80 MB, video/quicktime)
2024-03-11 17:30 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.