Remove `moz-input-box`
Categories
(Toolkit :: UI Widgets, task)
Tracking
()
People
(Reporter: ntim, Unassigned)
References
Details
Comment hidden (obsolete) |
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Brian, would it be possible to add some kind of API to editMenuOverlay.js that would allow adding context menu items in there ?
We probably don't need to worry about the old urlbar, but the searchbar will need this for "Paste & Search", "Clear Search History" and "Show Search Suggestions".
Maybe this could be done in a nicer way than an API in editMenuOverlay.js though ? The goal is to be able to get rid of any child markup including moz-input-box
from the autocomplete
binding, so we can simply have <html:input is="autocomplete-input" />
.
Comment 2•5 years ago
|
||
(In reply to Tim Nguyen :ntim from comment #1)
Brian, would it be possible to add some kind of API to editMenuOverlay.js that would allow adding context menu items in there ?
We probably don't need to worry about the old urlbar, but the searchbar will need this for "Paste & Search", "Clear Search History" and "Show Search Suggestions".
Maybe this could be done in a nicer way than an API in editMenuOverlay.js though ? The goal is to be able to get rid of any child markup including
moz-input-box
from theautocomplete
binding, so we can simply have<html:input is="autocomplete-input" />
.
Yeah, I'd ultimately like moz-input-box to go away. Perhaps we could either:
- implement a method on the input itself that editMenuOverlay.js would call to receive an alternative menupopup instead of https://searchfox.org/mozilla-central/rev/fe7dbedf223c0fc4b37d5bd72293438dfbca6cec/toolkit/content/editMenuOverlay.js#75 if it's implemented - like e.target.getContextMenu()
- have the element listen to the contextmenu event itself and create it's own popup & preventDefault(). This will already cause editMenuOverlay to bail out due to https://searchfox.org/mozilla-central/rev/fe7dbedf223c0fc4b37d5bd72293438dfbca6cec/toolkit/content/editMenuOverlay.js#66.
I sort of just lean towards (2) since it seems each consumer will have pretty specific needs (the search input items integrated throughout the rest of the menu, for instance). The amount of duplication is relatively small (https://searchfox.org/mozilla-central/rev/fe7dbedf223c0fc4b37d5bd72293438dfbca6cec/toolkit/content/editMenuOverlay.js#75-94) and would need to be partly duplicated anyway even in (1).
FWIW I'm guessing TB may want some kind of hook here too to enable spellcheck menuitems on inputs (as in https://bugzilla.mozilla.org/show_bug.cgi?id=1556203).
Reporter | ||
Comment 3•5 years ago
|
||
Looks like Andrew might be doing it all in one go for autocomplete
in bug 1534455, but it's still desirable to get rid of moz-input-box
regardless (from the urlbar notably).
Reporter | ||
Updated•5 years ago
|