Bug or Default Behavior? Cursor placement after using formatting hotkey (e.g., BOLD)

Hello,

I’m looking for clarification on whether the following is default behavior or an error: When using the Ctrl+B hotkey to bold text (or any formatting hotkey), the cursor is placed after the bolded word but still inside the closing **, instead of outside the double asterisks. For example, by default my cursor appears in the location denoted by “|” after using “CTRL B” to bold in the following: “**BOLDED TEXT|**”.

From what I understand, the cursor is supposed to automatically move outside the closing **. Is this the intended behavior, or is something wrong with my setup (I’ve already tried disabling all CSS Snippets)? Any suggestions on how to fix this OR confirmation that this is default obsidian behavior would be greatly appreciated!

Thanks!

Default behavior. It places the caret after the word but before the asterisks. This is so you can continue to type bold text.

Can you say where you learned or heard this? Maybe some documentation needs to be updated.

1 Like

I don’t think cursor should move after placing it to certain place. Examples:

test te|st test test **te|st** test
test |test test test **|test** test
test test| test test **test|** test

Cursor has certain place after double clicking words or selecting them from left to right or right to left. Obsidian doesn’t change that place after applying inline formatting.

Usually you have to use arrow keys or other navigation hotkeys (⌥→ etc) to move out of **⋯**. However Obsidian has one exception to this. When you begin by ⌘B then write your text you can escape **⋯** by hitting ⌘B again. I don’t know how this is implemented but maybe it uses simple logic that you can always escape from **⋯|** by hitting ⌘B (if the text is not selected).

2 Likes

Excellent points. I was testing by selecting text left-to-right only. I wasn’t aware of all the subtleties.

I never noticed that you could escape the **...** by hitting ⌘B again. It only does that when the caret is just left of the final asterisks. **word or phrase|** Otherwise it will un-bold (for me). It doesn’t seem to matter in what order you ran the command or typed. Only that the caret is to the right, inside, and no text selected.

1 Like

Unbolding is mostly consistent i.e. you can place the cursor inside **⋯** and then hit ⌘B. This works with multiple words like **test te|st**. However there are two bugs (I think):

  1. **|test** doesn’t unbold (nothing happens)
  2. **|test test** doesn’t unbold (instead it applies new bold)

Both unbold if the text is selected.

1 Like

Thanks for the confirming that this is simply default behavior. I believe it was an LLM that misguided me, so as far as I know, all documention is in order.

Appreciate the help.