Repository navigation
fix(chat): stop the mobile toolbar staying hidden in notes after composing - #595
Merged
Merged
Conversation
…osing The chat hides Obsidian's mobile toolbar via a body class while its composer has focus. Two paths left that class set, so the toolbar disappeared in note editing too: - Switching to a note's tab hides the focused composer with display:none, which fires no focusout in WebKit. syncActiveState now ends composing when the leaf stops rendering. - iOS often reports a null relatedTarget when focus moves from the composer straight into a note, so the blur was deferred until the keyboard closed, which never happens while the note is being edited. A document focusin listener now ends composing as soon as focus lands in any editor outside the composer; non-editor targets keep the deferral. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryRestores Obsidian's mobile toolbar when users leave the chat composer.
No actionable issues were found. The mobile behavior was not verified in a running Obsidian app. Reviews (1) · Last reviewed commit: "fix(chat): stop the mobile toolbar stayi..." · Reviewed by Greptile |
Leo310
added a commit
that referenced
this pull request
Nov 26, 2026
Google Gemini (#584), Mistral (#585) and LM Studio (#583) as providers, a directory of OpenAI-compatible services under More providers (#589), and a per-agent reasoning effort (#582). Quoting chat text into the input (#593), chats that open where the last one was (#592), model details read from each provider instead of models.dev (#586), and mobile fixes for the sidebar drawer, the Cupertino theme, the formatting toolbar and the empty-chat greeting (#594, #595, #596). Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On mobile the chat hides Obsidian's formatting toolbar while its composer has focus (#525), using a
s2b-chat-composingclass on<body>. Two paths could leave that class set after focus left the chat, so the toolbar disappeared in note editing as well:syncActiveStatehides the composer withdisplay: none, and WebKit fires nofocusoutfor that. It now ends composing when the leaf stops rendering.relatedTarget, soonFocusOutcouldn't see that focus went to an editor and deferred until the keyboard closed, which never happens while the note is being edited. A document-levelfocusinlistener now ends composing as soon as focus lands in any editor outside the composer. Non-editor targets (tapping the conversation) keep the deferral, so the composer still doesn't jump on blur.How I tested it
bun run check,format,lint,test(2441 passing) and a dev build. Not yet tried on a device; needs a live check on iOS: focus the chat composer, then (a) switch to a note tab and (b) tap straight into a note's editor, and confirm the toolbar is there in both.AI assistance: Claude Code diagnosed the leak from the maintainer's report and wrote the fix; the maintainer has not yet reviewed or tested it on-device.
Checklist
bun run check,bun run format,bun run lint, andbun run testpass locallymanifest.json: I noted that the docs site needs updating (see "Documentation" in CONTRIBUTING.md)