Fix Firefox web Ctrl+V paste regression#3349
Conversation
mdawaffe
left a comment
There was a problem hiding this comment.
@Epikaigle, @thabotswana - neither #3349 (this PR) nor #3350 work for me in Firefox 148.0.2.
The only thing that works for me is to just never do anything for Firefox :) For this PR (#3349), that means always returning false from canUseMonacoPasteShortcut() for Firefox regardless of whether the clipboard API or the paste command is supported.
That browser detection isn't very satisfying, but it's the simplest thing I found that worked. Note that it doesn't help the multiple-paste bug when pasting from the context menu (#3329 (comment))
Do either of you have any other thoughts?
|
@mdawaffe I updated this PR to take the simpler Firefox-specific approach you suggested. For Firefox web, I also disabled the Monaco editor context menu for Firefox web, so right-click paste uses Firefox's native context menu as well. Electron and non-Firefox browsers keep the existing Monaco clipboard behavior. The current changes are in:
I reran:
I also updated the PR description to match the current behavior. This is intended to fix the Firefox web clipboard path in the editor. The separate multiple-paste/context-menu behavior mentioned in |
Fix
Fixes Firefox web paste regressions in the note editor (
#3329).After
#3316, Simplenote re-added Monaco clipboard keybindings in the browser and continued using Monaco’s context menu there. In Firefox web mode, those Monaco clipboard paths are not reliable.This PR keeps the existing Monaco clipboard behavior for Electron and non-Firefox browsers, but for Firefox web it now:
Ctrl+VnativelyThat moves Firefox web back to the browser-native clipboard flow while keeping the current behavior elsewhere.
Test
Ctrl+Vpastes using the browser-native clipboard flow.npx eslint lib/note-content-editor.tsx lib/utils/platform.ts lib/utils/platform.test.tsnpx jest --config=./jest.config.js lib/utils/platform.test.tsmake buildRelease
RELEASE-NOTES.mdwas updated with: