Closed Bug 1584218 Opened 5 years ago Closed 5 years ago

ui.popup.disable_autohide has no effect on HTML:datalist popups

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: surkov, Assigned: surkov)

References

Details

Attachments

(1 file)

setting ui.popup.disable_autohide to true, opening a datalist popup for

data:text/html,<input list="datalist"><datalist id="datalist"><option>a</option><option>bobo</option></datalist>

and switching a window closes the popup

It turns out that this check is not enough https://searchfox.org/mozilla-central/source/layout/xul/nsXULPopupManager.cpp#201 to handle this case.

Emilio, it might be a quick to fix thing, but very helpful. Do you have ideas what a fix could be?

Flags: needinfo?(emilio)

That's handled in nsFormFillController. The blur case is this one: https://searchfox.org/mozilla-central/rev/f43ae7e1c43a4a940b658381157a6ea6c5a185c1/toolkit/components/satchel/nsFormFillController.cpp#866

Which ends up calling ClosePopup(). Probably just a pref check there would do?

Flags: needinfo?(emilio)

Somewhat related issue I've seen: the <select> popup is also hard to inspect/debug for this reason (closes when trying to inspect in the Browser Toolbox). I believe this should be fixed on the frontend with a pref check before calling hidePopup() at https://searchfox.org/mozilla-central/rev/f1e99da78fe6c3c68696358dac06aed90f8112d3/toolkit/actors/SelectParent.jsm#248.

Probably you just want the blur one right? Otherwise you cannot hide it at all.

https://searchfox.org/mozilla-central/rev/f1e99da78fe6c3c68696358dac06aed90f8112d3/toolkit/actors/SelectChild.jsm#310 is probably the place then.

yeah, closePopup looks too harsh, perhaps blur is the better place

Assignee: nobody → surkov.alexander

I filed a patch https://phabricator.services.mozilla.com/D47322, it's not linked with the bug for some reason. Emilio, if you didn't receive emails (who knows), I asked you for review there.

Pushed by asurkov@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/66ded616f2a1
form autofill and HTML:select don't respect ui.popup.disable_autohide preference r=emilio,MattN
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
See Also: → 1585085
QA Whiteboard: [qa-71b-p2]
See Also: → 1595989
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: