Add setting to disable automatic text selection menu #178
+10,440
−1
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.
This PR adds a user setting to disable the automatic text selection menu that appears when users select text in the ebook reader. This resolves conflicts with browser translation extensions that also respond to text selection events.
Problem
Users who have browser translation extensions (like Google Translate, Youdao, etc.) installed experience conflicts when selecting text in the reader. Both the reader's text selection menu and the translation extension popup would appear simultaneously, creating a poor user experience.
Solution
Added a new setting "Disable automatic text selection menu" that allows users to:
Changes Made
disableTextSelectionMenu
boolean property to the Settings interface instate.ts
TextSelectionMenu
component to conditionally render based on the settingScreenshots
Settings Page with New Option:

Setting Enabled (Checkbox Checked):

Behavior Comparison:
Default behavior (setting disabled) - Text selection menu appears:

With setting enabled - No popup menu appears:

Implementation Details
Testing
This change provides users with the flexibility to choose their preferred text selection experience while maintaining full backward compatibility.
Fixes #142.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.