fix: titlebar touch-action with !important (preserves design) - #17
Merged
Conversation
The inline style approach broke the title bar design on mobile. Using !important in CSS achieves the same effect (preventing the browser from stealing touch events) without interfering with the component's style prop merging.
There was a problem hiding this comment.
Pull request overview
This PR adjusts the TitleBar drag behavior on touch devices by moving touch-action: none from an inline React style override back into the component’s CSS module, using !important to ensure the rule consistently applies without impacting style prop handling or the 98.css-based layout.
Changes:
- Removed the inline
stylemerge that injectedtouchAction: 'none'into theTitleBarroot element. - Applied
touch-action: none !important;viaTitleBar.module.cssto preserve the intended visual styling while preventing touch scrolling/gesture interference during drag.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/window/TitleBar.tsx | Removes the inline touchAction style injection so consumer style props aren’t rewritten. |
| src/components/window/TitleBar.module.css | Enforces touch-action: none with !important on the title bar for reliable touch drag behavior. |
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.
Summary
Reverted the inline
style={{ touchAction: 'none' }}approach that brokethe title bar design, and instead use
!importantin CSS:This achieves the same effect — preventing mobile browsers from stealing
touch events during drag — without interfering with the component's
style prop merging.
Changes
TitleBar.tsx: Reverted inline style changeTitleBar.module.css: Added!importanttotouch-action: none