зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550561 - Support edit context menu on HTML inputs in chrome documents. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D30552 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
035ea12dc3
Коммит
e99e478383
|
@ -64,7 +64,7 @@ window.addEventListener("contextmenu", (e) => {
|
|||
// Note that there's not a risk of e.target being XBL anonymous content for <textbox> (which manages
|
||||
// its own context menu), because e.target will be the XBL binding parent in that case.
|
||||
let needsContextMenu = e.target.ownerDocument == document && !e.defaultPrevented && (
|
||||
(e.target.localName == "textarea" && e.target.namespaceURI == HTML_NS)
|
||||
(["textarea", "input"].includes(e.target.localName) && e.target.namespaceURI == HTML_NS)
|
||||
|| e.target.closest("textbox[is='search-textbox']")
|
||||
);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</commandset>
|
||||
|
||||
<html:textarea />
|
||||
|
||||
<html:input />
|
||||
<textbox is="search-textbox"/>
|
||||
|
||||
</window>
|
||||
|
|
|
@ -21,6 +21,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1513343
|
|||
|
||||
const elements = [
|
||||
win.document.querySelector("textarea"),
|
||||
win.document.querySelector("input"),
|
||||
win.document.querySelector("textbox[is='search-textbox']"),
|
||||
];
|
||||
for (const element of elements) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче