Skip to content

fix(editor): fix global shortcut interception, scroll view centering,…#122

Merged
ThisIs-Developer merged 1 commit into
mainfrom
feature/find-replace-redesign
May 27, 2026
Merged

fix(editor): fix global shortcut interception, scroll view centering,…#122
ThisIs-Developer merged 1 commit into
mainfrom
feature/find-replace-redesign

Conversation

@ThisIs-Developer
Copy link
Copy Markdown
Owner

Summary of Completed Fixes:

  1. Global Shortcut Interception (Ctrl + F & Ctrl + H): Migrated the event listeners from the local markdownEditor keydown event to the global document node. Keyboard shortcuts are now globally intercepted across all focus regions, preventing the browser default Find box.
  2. Floating Panel Position Reset: Added coordinate clearing to the panel close routine. Dragging positions are cleared so that every time the floating panel is reopened, it returns to its default top-right corner.
  3. Smooth Dock Transitions: Re-engineered the panel's DOM detaching and re-attaching sequences to occur instantly without panel resets, display hides, or search parameter losses.
  4. Display Mode State Persistence: Leveraged localStorage keys to cache and restore the user's last used mode preference (floating vs docked), separate from the dragging position resets.
  5. Split View Layout Bounds: Modified the flex calculations in applyPaneWidths() and introduced a dynamic --dock-width property:
    • editorPaneElement.style.flex = 0 0 calc((100% - var(--dock-width, 0px)) * ratio - 4px)
    • Both editor and preview panes now scale proportionally to fit exactly inside the screen container alongside the docked panel, preventing overlap.
  6. Search Highlights & Navigation Centering:
    • Text Blur Fix: Set color: transparent !important; on .find-highlight and .find-highlight.active classes. This keeps matching characters in the background highlight layer completely transparent, eliminating text doubling and fuzzy overlay rendering.
    • Auto-Scroll Fix: Integrated explicit vertical centering calculations into selectActiveMatch(), automatically scrolling the editor viewport to center focused match results during previous/next cycling.

… floating position resets, and split pane docking reflow
Copilot AI review requested due to automatic review settings May 27, 2026 09:36
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

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

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment May 27, 2026 9:36am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ThisIs-Developer ThisIs-Developer merged commit fc4e548 into main May 27, 2026
6 of 7 checks passed
@ThisIs-Developer ThisIs-Developer deleted the feature/find-replace-redesign branch May 27, 2026 09:59
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