Don't focus trap tab by default

Closed
RI
5mo ago
+928-390

Fixes #113

  • Collapsed Tab/Shift+Tab now fall through to native focus behavior, while selected text still indents/outdents.
  • Added public indentSelection() / outdentSelection() line transforms, using two spaces and setRangeText(..., 'preserve').
  • Added Ctrl/Cmd+] and Ctrl/Cmd+[ to shortcuts.
  • Added preview inert / aria-hidden syncing

Summary by cubic

Stop trapping focus on Tab: collapsed Tab/Shift+Tab now move focus while selections still indent/outdent (Fixes #113). Also adds indent/outdent shortcuts and improves preview accessibility.

  • New Features

    • Public APIs: indentSelection() and outdentSelection().
    • Shortcuts: Ctrl/Cmd + ] to indent, Ctrl/Cmd + [ to outdent.
  • Bug Fixes

    • Tab no longer traps focus; with a selection it indents/outdents, otherwise it follows native focus.
    • Preview stays out of the tab order with inert/aria-hidden until Preview mode.
    • Prevent duplicate global listener initialization.