зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1692339 - Add a "Redo" option underneath "Undo" in context menu for form fields r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D106565
This commit is contained in:
Родитель
b1199d9e09
Коммит
78395cc0e6
|
@ -270,7 +270,10 @@
|
|||
<menuitem id="context-undo"
|
||||
data-l10n-id="text-action-undo"
|
||||
command="cmd_undo"/>
|
||||
<menuseparator id="context-sep-undo"/>
|
||||
<menuitem id="context-redo"
|
||||
data-l10n-id="text-action-redo"
|
||||
command="cmd_redo"/>
|
||||
<menuseparator id="context-sep-redo"/>
|
||||
<menuitem id="context-cut"
|
||||
data-l10n-id="text-action-cut"
|
||||
command="cmd_cut"/>
|
||||
|
|
|
@ -789,7 +789,8 @@ class nsContextMenu {
|
|||
goUpdateGlobalEditMenuItems();
|
||||
|
||||
this.showItem("context-undo", this.onTextInput);
|
||||
this.showItem("context-sep-undo", this.onTextInput);
|
||||
this.showItem("context-redo", this.onTextInput);
|
||||
this.showItem("context-sep-redo", this.onTextInput);
|
||||
this.showItem("context-cut", this.onTextInput);
|
||||
this.showItem("context-copy", this.isContentSelected || this.onTextInput);
|
||||
this.showItem("context-paste", this.onTextInput);
|
||||
|
|
|
@ -1056,6 +1056,7 @@ add_task(async function test_textarea() {
|
|||
/*
|
||||
yield test_contextmenu("#test-textarea",
|
||||
["context-undo", false,
|
||||
"context-redo", false,
|
||||
"---", null,
|
||||
"context-cut", true,
|
||||
"context-copy", true,
|
||||
|
@ -1082,6 +1083,7 @@ add_task(async function test_textarea_spellcheck() {
|
|||
"spell-add-to-dictionary", true,
|
||||
"---", null,
|
||||
"context-undo", false,
|
||||
"context-redo", false,
|
||||
"---", null,
|
||||
"context-cut", true,
|
||||
"context-copy", true,
|
||||
|
@ -1122,6 +1124,7 @@ add_task(async function test_undo_add_to_dictionary() {
|
|||
["spell-undo-add-to-dictionary", true,
|
||||
"---", null,
|
||||
"context-undo", false,
|
||||
"context-redo", false,
|
||||
"---", null,
|
||||
"context-cut", true,
|
||||
"context-copy", true,
|
||||
|
@ -1155,6 +1158,7 @@ add_task(async function test_contenteditable() {
|
|||
"spell-add-to-dictionary", true,
|
||||
"---", null,
|
||||
"context-undo", false,
|
||||
"context-redo", false,
|
||||
"---", null,
|
||||
"context-cut", true,
|
||||
"context-copy", true,
|
||||
|
@ -1618,6 +1622,7 @@ add_task(async function test_select_input_text() {
|
|||
/*
|
||||
yield test_contextmenu("#test-select-input-text",
|
||||
["context-undo", false,
|
||||
"context-redo", false,
|
||||
"---", null,
|
||||
"context-cut", true,
|
||||
"context-copy", true,
|
||||
|
@ -1650,6 +1655,7 @@ add_task(async function test_select_input_text_password() {
|
|||
/*
|
||||
yield test_contextmenu("#test-select-input-text-type-password",
|
||||
["context-undo", false,
|
||||
"context-redo", false,
|
||||
"---", null,
|
||||
"context-cut", true,
|
||||
"context-copy", true,
|
||||
|
@ -1772,6 +1778,7 @@ add_task(async function test_input_spell_false() {
|
|||
/*
|
||||
yield test_contextmenu("#test-contenteditable-spellcheck-false",
|
||||
["context-undo", false,
|
||||
"context-redo", false,
|
||||
"---", null,
|
||||
"context-cut", true,
|
||||
"context-copy", true,
|
||||
|
|
|
@ -24,6 +24,8 @@ add_task(async function test_text_input() {
|
|||
await test_contextmenu("#input_text", [
|
||||
"context-undo",
|
||||
false,
|
||||
"context-redo",
|
||||
false,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
@ -49,6 +51,8 @@ add_task(async function test_text_input_disabled() {
|
|||
[
|
||||
"context-undo",
|
||||
false,
|
||||
"context-redo",
|
||||
false,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
@ -97,6 +101,8 @@ add_task(async function test_password_input() {
|
|||
null,
|
||||
"context-undo",
|
||||
false,
|
||||
"context-redo",
|
||||
false,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
@ -162,6 +168,8 @@ add_task(async function test_tel_email_url_number_input() {
|
|||
[
|
||||
"context-undo",
|
||||
false,
|
||||
"context-redo",
|
||||
false,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
@ -254,6 +262,8 @@ add_task(async function test_search_input() {
|
|||
[
|
||||
"context-undo",
|
||||
false,
|
||||
"context-redo",
|
||||
false,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
@ -290,6 +300,8 @@ add_task(async function test_text_input_readonly() {
|
|||
[
|
||||
"context-undo",
|
||||
false,
|
||||
"context-redo",
|
||||
false,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
|
|
@ -29,6 +29,8 @@ add_task(async function test_text_input_spellcheck() {
|
|||
[
|
||||
"context-undo",
|
||||
false,
|
||||
"context-redo",
|
||||
false,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
@ -88,6 +90,8 @@ add_task(async function test_text_input_spellcheckwrong() {
|
|||
null,
|
||||
"context-undo",
|
||||
null,
|
||||
"context-redo",
|
||||
null,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
@ -123,6 +127,8 @@ add_task(async function test_text_input_spellcheckwrong() {
|
|||
const kCorrectItems = [
|
||||
"context-undo",
|
||||
false,
|
||||
"context-redo",
|
||||
false,
|
||||
"---",
|
||||
null,
|
||||
"context-cut",
|
||||
|
|
|
@ -815,6 +815,7 @@
|
|||
_buildContextMenu() {
|
||||
const raw = `
|
||||
<menuitem data-l10n-id="text-action-undo" cmd="cmd_undo"/>
|
||||
<menuitem data-l10n-id="text-action-redo" cmd="cmd_redo"/>
|
||||
<menuseparator/>
|
||||
<menuitem data-l10n-id="text-action-cut" cmd="cmd_cut"/>
|
||||
<menuitem data-l10n-id="text-action-copy" cmd="cmd_copy"/>
|
||||
|
|
|
@ -114,6 +114,7 @@ window.addEventListener("contextmenu", e => {
|
|||
MozXULElement.parseXULToFragment(`
|
||||
<menupopup id="textbox-contextmenu" class="textbox-contextmenu">
|
||||
<menuitem data-l10n-id="text-action-undo" command="cmd_undo"></menuitem>
|
||||
<menuitem data-l10n-id="text-action-redo" command="cmd_redo"></menuitem>
|
||||
<menuseparator></menuseparator>
|
||||
<menuitem data-l10n-id="text-action-cut" command="cmd_cut"></menuitem>
|
||||
<menuitem data-l10n-id="text-action-copy" command="cmd_copy"></menuitem>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
get editMenuItems() {
|
||||
return `
|
||||
<menuitem data-l10n-id="text-action-undo" cmd="cmd_undo"></menuitem>
|
||||
<menuitem data-l10n-id="text-action-redo" cmd="cmd_redo"></menuitem>
|
||||
<menuseparator></menuseparator>
|
||||
<menuitem data-l10n-id="text-action-cut" cmd="cmd_cut"></menuitem>
|
||||
<menuitem data-l10n-id="text-action-copy" cmd="cmd_copy"></menuitem>
|
||||
|
|
Загрузка…
Ссылка в новой задаче