-
Notifications
You must be signed in to change notification settings - Fork 8
Revised Selection Behavior #151
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
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
47066df
Selection behavior change: annotation gets created on pointer up, not…
rsimon f786661
Removed pointerup/keydown event requirement from popup
rsimon b96f04a
Formatting
rsimon c14ed99
Keyboard selection
rsimon 9e3f045
Addresses #139 in the revised selection model
rsimon 85dfa24
Merge branch 'main' into revised-selection-behavior
rsimon 9461812
Bugfix
rsimon e26b657
Upserting target instead of inserting on Shift up
rsimon 08c8b71
CTRL/CMD+A support
rsimon 56c6670
Listening to event for mobile support
rsimon 233254f
Work in progress
rsimon 4c5b09d
Minor changes
rsimon 85e351a
Mobile fixes (Android in particular)
rsimon c8000a1
Device-specific 'select all' key
rsimon 4c7c67e
Minor touch tweak
rsimon 5d0af35
Bugfix/reverted broken change
rsimon fb3d70b
Minor fix
rsimon b2e6233
Minor bugfix
rsimon eb942a3
'Select All' workaround
rsimon 9cf64f8
Select-all fix
rsimon 5adbeeb
Update packages/text-annotator/src/SelectionHandler.ts
rsimon 28908cf
Update packages/text-annotator/src/SelectionHandler.ts
rsimon 8d113dc
Minor fix
rsimon 6758d7d
Reverted to button for screenreader close hint
rsimon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/text-annotator-react/src/TextAnnotatorPopup/isMobile.ts
rsimon marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system | ||
export const isMobile = () => { | ||
// @ts-ignore | ||
var userAgent: string = navigator.userAgent || navigator.vendor || window.opera; | ||
|
||
if (/android/i.test(userAgent)) | ||
return true; | ||
|
||
// @ts-ignore | ||
// Note: as of recently, this NO LONGER DETECTS FIREFOX ON iOS! | ||
// This means FF/iOS will behave like on the desktop, and loose | ||
// selection handlebars after the popup opens. | ||
if (/iPad|iPhone/.test(userAgent) && !window.MSStream) | ||
return true; | ||
|
||
return false; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.