Skip to content

fix: titlebar touch-action with !important (preserves design) - #17

Merged
MegaBlackLabel merged 1 commit into
mainfrom
fix/titlebar-design
Jul 2, 2026
Merged

fix: titlebar touch-action with !important (preserves design)#17
MegaBlackLabel merged 1 commit into
mainfrom
fix/titlebar-design

Conversation

@MegaBlackLabel

Copy link
Copy Markdown
Owner

Summary

Reverted the inline style={{ touchAction: 'none' }} approach that broke
the title bar design, and instead use !important in CSS:

.titleBar {
  touch-action: none !important;
}

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 change
  • TitleBar.module.css: Added !important to touch-action: none

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.
Copilot AI review requested due to automatic review settings July 2, 2026 14:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 style merge that injected touchAction: 'none' into the TitleBar root element.
  • Applied touch-action: none !important; via TitleBar.module.css to 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.

@MegaBlackLabel
MegaBlackLabel merged commit c4ae282 into main Jul 2, 2026
1 check passed
@MegaBlackLabel
MegaBlackLabel deleted the fix/titlebar-design branch July 2, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants