Skip to content

fix/restore paste on firefox - #31

Open
stanley2058 wants to merge 1 commit into
hackmdio:masterfrom
stanley2058:fix/firefox-paste
Open

fix/restore paste on firefox#31
stanley2058 wants to merge 1 commit into
hackmdio:masterfrom
stanley2058:fix/firefox-paste

Conversation

@stanley2058

Copy link
Copy Markdown
  • restore paste in context menu on firefox

before:
image
after:
image

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores reliable access to the native “Paste” item in Firefox’s context menu by switching Firefox to the same “capture right-click early” path used for other affected browsers, and by ensuring the right-click cleanup runs even when Firefox doesn’t deliver the expected mouseup event on window.

Changes:

  • Treat Gecko (Firefox) as a browser that needs captureRightClick handling.
  • In the right-click context menu hack, also listen for contextmenu to trigger the cleanup path when mouseup isn’t fired on window (modern Firefox behavior).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/util/browser.js Expands captureRightClick to include Gecko so Firefox uses the early right-click handling path.
src/input/TextareaInput.js Adds a contextmenu fallback listener to reliably run the re-hide cleanup after the native menu opens in Firefox.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants