GeezerVison is showing github.com — fix(web): Mod+B bolds at a collapsed cursor when the sidebar toggle i… · pingdotgg/t3code@927f136
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/web/src/components/ComposerPromptEditorTiptap.tsx -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -70,7 +70,6 @@ import { | 70 | 70 | ComposerListExtensions, | 71 | 71 | buildTiptapContent, | 72 | 72 | caretTakesMarksBefore, | 73 | | - ComposerBoldSelectionOnlyExtension, | 74 | 73 | convertBulletItemToTask, | 75 | 74 | ComposerCodeExtension, | 76 | 75 | ComposerBoldExtension, | @@ -845,7 +844,6 @@ function createComposerExtensions(richText: boolean) { | 845 | 844 | ComposerMarkersExtension, | 846 | 845 | ...(richText | 847 | 846 | ? [ | 848 | | - ComposerBoldSelectionOnlyExtension, | 849 | 847 | ComposerItalicExtension, | 850 | 848 | ComposerBoldExtension, | 851 | 849 | ComposerStrikeExtension, | |
Collapse file Copy file name to clipboardExpand all lines: apps/web/src/composer-rich-text-doc.ts -15Lines changed: 0 additions & 15 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -20,7 +20,6 @@ import { Italic, starInputRegex, starPasteRegex } from "@tiptap/extension-italic | 20 | 20 | import { | 21 | 21 | type Command, | 22 | 22 | type Editor, | 23 | | - Extension, | 24 | 23 | InputRule, | 25 | 24 | markInputRule, | 26 | 25 | markPasteRule, | @@ -298,20 +297,6 @@ export const ComposerStrikeExtension = Strike.extend({ | 298 | 297 | }, | 299 | 298 | }); | 300 | 299 |
| 301 | | -/** | 302 | | - * Mod+B bolds selected text only. Without a selection Tiptap would toggle bold | 303 | | - * for the next typed text, which users hit by accident when they mean the | 304 | | - * sidebar toggle. Runs ahead of the Bold extension and swallows the chord. | 305 | | - */ | 306 | | -export const ComposerBoldSelectionOnlyExtension = Extension.create({ | 307 | | - name: "composerBoldSelectionOnly", | 308 | | - priority: 1000, | 309 | | - addKeyboardShortcuts() { | 310 | | - const ignoreWithoutSelection = () => this.editor.state.selection.empty; | 311 | | - return { "Mod-b": ignoreWithoutSelection, "Mod-B": ignoreWithoutSelection }; | 312 | | - }, | 313 | | -}); | 314 | | - | 315 | 300 | /** | 316 | 301 | * Tiptap's block chords can nest blocks inside quotes that the serializer cannot write, | 317 | 302 | * silently dropping their text from stored drafts. | |
Collapse file Copy file name to clipboardExpand all lines: apps/web/src/keybindings.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -379,7 +379,7 @@ export function isOpenFavoriteEditorShortcut( | 379 | 379 | * Whether the keypress should bold text in the rich-text composer: Mod+B | 380 | 380 | * without extra modifiers, with text selected. Tiptap binds the same chord, so | 381 | 381 | * app shortcuts captured ahead of the editor yield only in that case. With no | 382 | | - * selection the chord stays with the app (the sidebar toggle by default). | | 382 | + * selection an app binding on the chord wins (the sidebar toggle by default). | 383 | 383 | */ | 384 | 384 | export function isRichTextBoldShortcut( | 385 | 385 | event: ShortcutEventLike, | |
|