mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
fix(desktop): show the text context menu on password fields (#3285)
This commit is contained in:
1 parent
e7859fefb1
commit
510cc1b916
4 files changed
+17
-71
No files matched your search
@@ -217,6 +217,7 @@ export const TextareaContextMenu = observer(
|
||||
);
|
||||
onClose();
|
||||
};
|
||||
const isPasswordTarget = targetElement instanceof HTMLInputElement && targetElement.type === 'password';
|
||||
const spellcheckEnabled = Spellcheck.enabled;
|
||||
const hasMisspelling = spellcheckEnabled && misspelledWord && suggestions.length > 0;
|
||||
return (
|
||||
@@ -307,19 +308,21 @@ export const TextareaContextMenu = observer(
|
||||
{i18n._(SELECT_ALL_DESCRIPTOR)}
|
||||
</MenuItem>
|
||||
</MenuGroup>
|
||||
<MenuGroup data-flx="channel.textarea.textarea-context-menu.menu-group--5">
|
||||
<MenuItemSubmenu
|
||||
label={i18n._(SPELLCHECK_DESCRIPTOR)}
|
||||
render={() => (
|
||||
<SpellcheckSubmenu
|
||||
isElectron={isElectron()}
|
||||
onOpenSpellcheckSettings={handleOpenSpellcheckSettings}
|
||||
data-flx="channel.textarea.textarea-context-menu.spellcheck-submenu"
|
||||
/>
|
||||
)}
|
||||
data-flx="channel.textarea.textarea-context-menu.menu-item-submenu"
|
||||
/>
|
||||
</MenuGroup>
|
||||
{!isPasswordTarget && (
|
||||
<MenuGroup data-flx="channel.textarea.textarea-context-menu.menu-group--5">
|
||||
<MenuItemSubmenu
|
||||
label={i18n._(SPELLCHECK_DESCRIPTOR)}
|
||||
render={() => (
|
||||
<SpellcheckSubmenu
|
||||
isElectron={isElectron()}
|
||||
onOpenSpellcheckSettings={handleOpenSpellcheckSettings}
|
||||
data-flx="channel.textarea.textarea-context-menu.spellcheck-submenu"
|
||||
/>
|
||||
)}
|
||||
data-flx="channel.textarea.textarea-context-menu.menu-item-submenu"
|
||||
/>
|
||||
</MenuGroup>
|
||||
)}
|
||||
{showSendButtonToggle && (
|
||||
<MenuGroup data-flx="channel.textarea.textarea-context-menu.menu-group--6">
|
||||
<CheckboxItem
|
||||
|
||||
@@ -43,7 +43,6 @@ const DISALLOWED_INPUT_TYPES = new Set([
|
||||
'submit',
|
||||
'time',
|
||||
'week',
|
||||
'password',
|
||||
]);
|
||||
const CONTEXT_TARGET_MAX_AGE_MS = 5000;
|
||||
const createSyntheticEvent = (
|
||||
|
||||
Reference in new issue
Block a user