mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
fix(composer): stop the mobile caret misplacing on command mode toggles
The composer frame kept `opacity-95` and `backdrop-blur-md`, so it stayed a composited layer with the textarea inside it. Repainting that layer whenever command or mention mode toggled (frame class change, mode badge mount, takeover list mount, z-index change) still made iOS draw the caret at a stale position below the typed text, even after the transition was removed. Render the frosted background as a `before:` pseudo-element and drop the compositing from the frame, so the textarea's ancestor is never a layer that repaints on mode changes. Add a regression test pinning the invariant.
This commit is contained in:
1 parent
e42ce1bd56
commit
4553af41dc
2 files changed
+14
-1
No files matched your search
@@ -1472,7 +1472,7 @@ if (isIOS && isSecureContext && navigator.clipboard && navigator.clipboard.read)
|
||||
|
||||
|
||||
return (
|
||||
<div className={`relative backdrop-blur-md bg-background opacity-95 border border-border dark:border-border/30 rounded-xl p-2 md:p-3 mb-4 md:mb-1 w-full ${hasPendingPermissionForSession ? 'border-highlight/50 ring-1 ring-highlight/30' : composerModeStyle?.frame ?? ''} ${isTakeoverOpen ? 'z-[60]' : ''}`}>
|
||||
<div className={`relative isolate border border-border dark:border-border/30 rounded-xl p-2 md:p-3 mb-4 md:mb-1 w-full before:pointer-events-none before:absolute before:-inset-px before:-z-10 before:rounded-xl before:bg-background/95 before:backdrop-blur-md before:content-[''] ${hasPendingPermissionForSession ? 'border-highlight/50 ring-1 ring-highlight/30' : composerModeStyle?.frame ?? ''} ${isTakeoverOpen ? 'z-[60]' : ''}`}>
|
||||
{composerModeStyle && (
|
||||
<span
|
||||
data-testid="composer-mode-badge"
|
||||
|
||||
Reference in new issue
Block a user