GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): Mod+B bolds at a collapsed cursor when the sidebar toggle i… · pingdotgg/t3code@927f136

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src
    • components
      • ComposerPromptEditorTiptap.tsx
    • composer-rich-text-doc.ts
    • keybindings.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/ComposerPromptEditorTiptap.tsx‎

Copy file name to clipboardExpand all lines: apps/web/src/components/ComposerPromptEditorTiptap.tsx
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ import {
7070
ComposerListExtensions,
7171
buildTiptapContent,
7272
caretTakesMarksBefore,
73-
ComposerBoldSelectionOnlyExtension,
7473
convertBulletItemToTask,
7574
ComposerCodeExtension,
7675
ComposerBoldExtension,
@@ -845,7 +844,6 @@ function createComposerExtensions(richText: boolean) {
845844
ComposerMarkersExtension,
846845
...(richText
847846
? [
848-
ComposerBoldSelectionOnlyExtension,
849847
ComposerItalicExtension,
850848
ComposerBoldExtension,
851849
ComposerStrikeExtension,
Collapse file

‎apps/web/src/composer-rich-text-doc.ts‎

Copy file name to clipboardExpand all lines: apps/web/src/composer-rich-text-doc.ts
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { Italic, starInputRegex, starPasteRegex } from "@tiptap/extension-italic
2020
import {
2121
type Command,
2222
type Editor,
23-
Extension,
2423
InputRule,
2524
markInputRule,
2625
markPasteRule,
@@ -298,20 +297,6 @@ export const ComposerStrikeExtension = Strike.extend({
298297
},
299298
});
300299

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-
315300
/**
316301
* Tiptap's block chords can nest blocks inside quotes that the serializer cannot write,
317302
* silently dropping their text from stored drafts.
Collapse file

‎apps/web/src/keybindings.ts‎

Copy file name to clipboardExpand all lines: apps/web/src/keybindings.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ export function isOpenFavoriteEditorShortcut(
379379
* Whether the keypress should bold text in the rich-text composer: Mod+B
380380
* without extra modifiers, with text selected. Tiptap binds the same chord, so
381381
* 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).
383383
*/
384384
export function isRichTextBoldShortcut(
385385
event: ShortcutEventLike,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.