fix: prevent canvas text-selection highlight on shift+drag in Tauri#12995
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (50.74%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release-1.10.0 #12995 +/- ##
==================================================
- Coverage 54.69% 54.58% -0.11%
==================================================
Files 2101 2102 +1
Lines 192799 192835 +36
Branches 29257 27674 -1583
==================================================
- Hits 105443 105267 -176
- Misses 86186 86398 +212
Partials 1170 1170
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
The canvas viewport div to render a blue browser selection highlight in the
Tauri app but not in the OSS web version
Root cause
Tauri uses WKWebView (WebKit) on macOS rather than a Chromium renderer. Chromium
automatically suppresses text selection on elements during pointer-drag gestures,
even without an explicit
user-selectrule. WKWebView does not — it applies thenative selection highlight unless the element explicitly opts out via
-webkit-user-select: none.Test plan
confirm no blue text-selection highlight appears on the viewport div
drag already suppresses selection natively)
Before on Safari


After on Safari