mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 641217 - Show context menu for password fields [r+a=mfinkle]
This commit is contained in:
parent
604e2ffe61
commit
07b44c3900
@ -847,11 +847,14 @@ var ContextHandler = {
|
||||
state.linkProtocol = this._getProtocol(this._getURI(state.linkURL));
|
||||
break;
|
||||
} else if ((elem instanceof Ci.nsIDOMHTMLInputElement &&
|
||||
elem.mozIsTextField(true)) || elem instanceof Ci.nsIDOMHTMLTextAreaElement) {
|
||||
elem.mozIsTextField(false)) || elem instanceof Ci.nsIDOMHTMLTextAreaElement) {
|
||||
let selectionStart = elem.selectionStart;
|
||||
let selectionEnd = elem.selectionEnd;
|
||||
|
||||
state.types.push("input-text");
|
||||
|
||||
// Don't include "copy" for password fields.
|
||||
if (elem.mozIsTextField(true)) {
|
||||
if (selectionStart != selectionEnd) {
|
||||
state.types.push("copy");
|
||||
state.string = elem.value.slice(selectionStart, selectionEnd);
|
||||
@ -859,6 +862,7 @@ var ContextHandler = {
|
||||
state.types.push("copy-all");
|
||||
state.string = elem.value;
|
||||
}
|
||||
}
|
||||
|
||||
if (selectionStart > 0 || selectionEnd < elem.textLength)
|
||||
state.types.push("select-all");
|
||||
|
Loading…
Reference in New Issue
Block a user