Skip to content

fix(#274): improve toolbar button responsiveness in article views#287

Merged
cassio-rossi merged 1 commit into
release/v5from
fix/toolbar-button-hit-testing
Apr 30, 2026
Merged

fix(#274): improve toolbar button responsiveness in article views#287
cassio-rossi merged 1 commit into
release/v5from
fix/toolbar-button-hit-testing

Conversation

@cassio-rossi
Copy link
Copy Markdown
Collaborator

Summary

  • Navigation bar buttons (back, share, favorite, filters) required multiple taps to respond
  • Root cause: Color.clear.opacity(0) in ManagedWebView was intercepting touches. This invisible view serves as a layout container for iPad sidebar spacing (.safeAreaInset(edge: .trailing)), but SwiftUI's hit-testing considers view frame regardless of opacity
  • Fix: Replaced .opacity(0) with .allowsHitTesting(false) — preserves the layout behavior for iPad while ensuring touches pass through to the toolbar button layer

Closes #274

Test plan

  • Open an article — tap back button: should respond on first tap
  • Tap share button in article: should respond on first tap
  • Tap favorite button in article: should respond on first tap
  • Open news filter: button should respond on first tap
  • iPad: verify article content still respects sidebar spacing
  • Verify WebView content itself remains scrollable and interactive

🤖 Generated with Claude Code

The Color.clear used as a layout container for the safeAreaInset
(iPad sidebar spacing) was intercepting touches in the navigation
bar area. This caused toolbar buttons (back, share, favorite, filters)
to require multiple taps. Adding .allowsHitTesting(false) ensures
touches pass through to the toolbar layer while preserving the
safeAreaInset layout behavior for iPad.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cassio-rossi cassio-rossi merged commit 325448e into release/v5 Apr 30, 2026
2 checks passed
@cassio-rossi cassio-rossi deleted the fix/toolbar-button-hit-testing branch April 30, 2026 19:58
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.

Melhorar responsabilidade dos botões superiores

2 participants