Skip to content

Fix cursor shape on iPadOS with physical pointer #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 5, 2025

Conversation

mickael-menu
Copy link
Member

Fixed

Navigator

  • Fixed the cursor shape on iPadOS when using a physical trackpad or mouse.
Screen.Recording.2025-05-05.at.14.56.09.mov

Copy link

@Copilot Copilot AI left a comment

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 fixes the cursor shape on iPadOS when using a physical trackpad or mouse and cleans up legacy workarounds.

  • Removed legacy user-interaction toggling in WebView.swift.
  • Updated the NavigatorDelegate method to accept a RelativeURL instead of a String.
  • Removed the outdated workaround for setting the CSS cursor in gestures.js.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

File Description
Sources/Navigator/Toolkit/WebView.swift Removed legacy toggling of isUserInteractionEnabled to clear selection overlays.
Sources/Navigator/Navigator.swift Changed the parameter type for didFailToLoadResourceAt from String to RelativeURL.
Sources/Navigator/EPUB/Scripts/src/gestures.js Removed the legacy cursor style workaround for pre-iOS 13 click event handling.
CHANGELOG.md Updated changelog to document the cursor shape fix on iPadOS.
Comments suppressed due to low confidence (2)

Sources/Navigator/EPUB/Scripts/src/gestures.js:9

  • [nitpick] The removal of the legacy workaround for pre-iOS 13 click events should be verified to ensure that environments still requiring this behavior are accounted for or no longer supported.
document.body.style.cursor = "pointer";

Sources/Navigator/Navigator.swift:168

  • Changing the href parameter type from String to RelativeURL may require updates in delegate implementations; please ensure that this change aligns with the intended API design.
func navigator(_ navigator: Navigator, didFailToLoadResourceAt href: RelativeURL, withError error: ReadError) {}

@mickael-menu mickael-menu merged commit 617d07f into develop May 5, 2025
5 checks passed
@mickael-menu mickael-menu deleted the fix/cursor-ipados branch May 5, 2025 14:56
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.

1 participant