Closed Bug 918600 Opened 12 years ago Closed 9 years ago

Tooltips and autocomplete not visible from panels

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(firefox51 fixed)

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: brettz9, Assigned: jwkbugzilla)

References

Details

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release) Build ID: 20130917123208 Steps to reproduce: Add code like <div title="a tooltip">Hover over me to see a tooltip</div> or <div>Enter a browser:</div> <input list="browsers" /> <datalist id="browsers"> <option value="Chrome"> <option value="Firefox"> <option value="Internet Explorer"> <option value="Opera"> <option value="Safari"> </datalist> ...to a panel. Actual results: "title" tooltips don't show on hovering over the element with a "title" attribute and neither does the datalist autocomplete. Expected results: A simple tooltip should show on hovering over the element with a "title", and autocomplete values should display and be selectable when typing initial-matching letter sequences.
Probably has to do with it being a XUL panel, hm..
bug 744884 (which i marked duplicate because STR) was P1, so taking P2 off to re-prioritize. also, bug 952578 seems related. we should get someone from platform to look at this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: P2 → --
Is there any reason that plain HTML cannot be used in place of XUL panels, encouraging the use of HTML widgets communicating through content scripts to get any higher level behaviors? For example, to overcome this issue with autocomplete, I've hacked my own autocomplete code (for file paths at https://github.com/brettz9/executable-builder/blob/master/lib/executableResponses.js#L510 or URL history at https://github.com/brettz9/executable-builder/blob/master/lib/executableResponses.js#L108 though this code is not yet fully modularized). It is nice to get the other benefits of HTML, such as the ability to introspect elements, copy-paste text, have access to add-ons which overlay context menus, etc. In my view, such an approach would be more in line with FF's traditions of user introspection and hackability. (The only concern I've encountered thus far is that I am not aware of any alternative to granting chrome privileges to the openDialog() call to open my HTML in order to get it to display centerscreen.)
I can confirm that it's not related to SDK: creating a XUL panel in scratchpad and adding the HTML elements by creating directly inside without iframe, has the same result.
Component: General → XP Toolkit/Widgets: XUL
Product: Add-on SDK → Core
You'll need a tooltip assigned to the frame like so: let view = getActiveView(panel); view.querySelector("iframe").setAttribute("tooltip", "aHTMLTooltip");
Yes, this is definitely miscategorized - that's an SDK issue, not XUL. The xul:iframe element generated by the SDK is missing a tooltip attribute. I can confirm that the suggestion in comment #7 works, adding tooltip="aHTMLTooltip" to that element via Browser Toolbox makes tooltips work. In other words, the following change applied to https://github.com/mozilla/addon-sdk/blob/3b8aed/lib/sdk/panel/utils.js#L243 should do (at least for Firefox): frame.setAttribute("transparent", "transparent"); frame.setAttribute("autocompleteenabled", true); + frame.setAttribute("tooltip", "aHTMLTooltip"); if (platform === "darwin") { frame.style.borderRadius = "6px";
Component: XP Toolkit/Widgets: XUL → General
Product: Core → Add-on SDK
Assignee: nobody → trev.moz
Status: NEW → ASSIGNED
I created a pull request under https://github.com/mozilla/addon-sdk/pull/2050.
Attached patch Proposed patch (obsolete) — Splinter Review
Attachment #8788584 - Flags: review?(zer0)
Comment on attachment 8788584 [details] [diff] [review] Proposed patch Review of attachment 8788584 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me! Thanks Wladimir for working on this!
Attachment #8788584 - Flags: review?(zer0) → review+
Attached patch Proposed patchSplinter Review
Created a proper Mercurial patch against mozilla-central, taking over r+ flag.
Attachment #8788584 - Attachment is obsolete: true
Attachment #8789345 - Flags: review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/fx-team/rev/54358335e1b1 Make sure tooltips are displayed for SDK panels. r=zer0
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: