Work around contenteditable not updating Edit menu in reader and notes
This seems to be a Firefox bug that exists even in Firefox 132.0a1 (2024-09-29). Note that right-clicking to open the context menu on a contenteditable element also triggers an update to the Edit menu. The fix updates all Edit menu options except Redo, which cannot be enabled due to ProseMirror modifying the contenteditable state after each change. Partial fix for #3398
This commit is contained in:
parent
7c8e672f2f
commit
30024487f3
3 changed files with 6 additions and 3 deletions
|
@ -85,7 +85,8 @@
|
|||
</menu>
|
||||
|
||||
<menu id="edit-menu" data-l10n-id="menu-edit">
|
||||
<menupopup id="menu_EditPopup">
|
||||
<!-- goUpdateGlobalEditMenuItems(true) is necessary to update Edit menu when contenteditable is focused -->
|
||||
<menupopup id="menu_EditPopup" onpopupshowing="goUpdateGlobalEditMenuItems(true)">
|
||||
<menuitem id="menu_undo"
|
||||
key="key_undo"
|
||||
command="cmd_undo" data-l10n-id="text-action-undo"/>
|
||||
|
|
|
@ -113,7 +113,8 @@
|
|||
</menu>
|
||||
|
||||
<menu id="edit-menu" data-l10n-id="menu-edit">
|
||||
<menupopup id="menu_EditPopup">
|
||||
<!-- goUpdateGlobalEditMenuItems(true) is necessary to update Edit menu when contenteditable is focused -->
|
||||
<menupopup id="menu_EditPopup" onpopupshowing="goUpdateGlobalEditMenuItems(true)">
|
||||
<menuitem id="menu_undo"
|
||||
key="key_undo"
|
||||
command="cmd_undo" data-l10n-id="text-action-undo"/>
|
||||
|
|
|
@ -344,8 +344,9 @@
|
|||
</menu>
|
||||
|
||||
<menu id="edit-menu" data-l10n-id="menu-edit">
|
||||
<!-- goUpdateGlobalEditMenuItems(true) is necessary to update Edit menu when contenteditable is focused -->
|
||||
<menupopup id="menu_EditPopup"
|
||||
onpopupshowing="ZoteroStandalone.updateQuickCopyOptions()">
|
||||
onpopupshowing="ZoteroStandalone.updateQuickCopyOptions();goUpdateGlobalEditMenuItems(true)">
|
||||
<menuitem id="menu_undo"
|
||||
key="key_undo"
|
||||
command="cmd_undo" data-l10n-id="text-action-undo"/>
|
||||
|
|
Loading…
Reference in a new issue