46 bytes, text/x-phabricator-request
|Details | Review|
See bug 1486166 for example, which used the tooltiptext attribute. I couldn't make it use title and instead I had to resort of setting the attribute on the parent box.
Thanks for filing. I've noticed another problem with tooltips with XUL elements in HTML documents when fixing tests for browser.xhtml: 1) mk_add_options 'export MOZ_BROWSER_XHTML=1' 2) `./mach run` then hover over a tab title, or back button, or whatever A small tooltip bubble pops up, but no text is inside of it. Do you think that's the same root cause as this bug or something different?
Sounds likely. I'm not the most familiar with the whole setup, but there's: https://searchfox.org/mozilla-central/rev/55da592d85c2baf8d8818010c41d9738c97013d2/xpfe/appshell/nsXULWindow.cpp#1140 The setup as far as I can tell is that XUL elements use nsXULTooltipListener, and HTML documents end up creating a ChromeTooltipListener. I don't know how they'd interact both together, probably we should try to unify them?
Adding the tooltip "aHTMLTooltip" to the parent XUL element causes an nsXULTooltipListener to be added the XUL element. The "aHTMLTooltip" has the page attribute set, so when the popup is shown the tooltip binding will fill the tooltip text from the HTML element's title attribute. MozReview-Commit-ID: KumhzLTTg3b
Emilio, I'm not sure this is really better, but it works. The real underlying issue is that we handle HTML and XUL tooltips very differently. For XUL, the XUL element itself is responsible for adding event listeners to show the tooltip. Whereas for HTML, there is one event listener overall that then get's the tooltip text from the element the mouse is over. The one listener is either a special "page" XUL tooltip around the content or a ChromeTooltipListener in the child process.
Comment on attachment 9007334 [details] Bug 1486716 - Use a page tooltip for the url bar. r=emilio Dão Gottwald [::dao] has approved the revision.
Attachment #9007334 - Flags: review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/3d6dcf35e8f4 Use a page tooltip for the url bar. r=dao
7 months ago
Component: DOM → Address Bar
Product: Core → Firefox
Summary: The title attribute doesn't work on HTML elements on chrome documents. → Replace bug 1486166's URL bar tooltip workaround
Target Milestone: mozilla64 → Firefox 64
You need to log in before you can comment on or make changes to this bug.