Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@andrewzamojc
Copy link
Contributor

@andrewzamojc andrewzamojc commented Oct 28, 2025

Description & motivation 💭

When code block is maximized, if the user tries to select the code to copy, the component suddenly minimizes. This PR allows the user to select text without triggering minimizing.

Screenshots (if applicable) 📸

Screenshot 2025-10-28 at 6 59 12 PM

Design Considerations 🎨

To get selecting working, this PR makes the CodeMirror editor always "editable" which really means focusable and selectable. Readonly still controls if the user can change the code by typing. This setup gives a pretty reasonable UX, where the user can selected text from the editor by mouse or keyboard, and scroll with up/down arrows. It's a little more "edity" than we'd probably want, but we get a lot for free. Since the editor now receives the focus, we can remove the tab index on its parent div.

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
holocene Ready Ready Preview Comment Oct 28, 2025 10:56pm

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