Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-click and middle-click in cm-scroller outside cm-content removes the focus status #1277

Closed
arthur5005 opened this issue Oct 5, 2023 · 2 comments

Comments

@arthur5005
Copy link

arthur5005 commented Oct 5, 2023

Describe the issue

I know this was previously reported, and somewhat fixed in this issue: #1256, but this issue persists with right and middle click, and is really annoying for mouse users who are trying to paste text into an empty code mirror document.

right-click-loses-focus-mq.mp4

How To Reproduce

If you're focused on the last line (you absolutely have to already be focused on the last line) and then right click outside cm-content, you will lose focus before your paste complete. Focus is also lost with middle-click outside cm-content but I'm not sure how important this is...

When Did This Issue Start Happening?

We narrowed this issue to changes between 6.6.0 to 6.7.0 (as in 6.6.0 does not experience this)

Browser and platform

macOS Ventura 13.4.1, Chrome 117.0.5938.149

Reproduction link

https://codemirror.net/try/

@marijnh
Copy link
Member

marijnh commented Oct 6, 2023

Attached patch should sidestep this entire class of issues.

@arthur5005
Copy link
Author

Amazing, thank you!

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

No branches or pull requests

2 participants