-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802) #17720
[Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802) #17720
Conversation
f9996c1
to
1cfb772
Compare
970b989
to
cd4b84b
Compare
…d arrow down (bug 1881802) In implementing caret browsing mode in pdf.js, I didn't notice that selectstart isn't always triggered. So this patch removes the use of selectstart and rely only on selectionchange. In order to simplify the selection management, the selection code is moved in the AnnotationUIManager: - it simplifies the code; - it allows to have only one listener for selectionchange instead of having one by visible page for selectstart. I had to add a delay in the integration tests for highlighting (there's a comment with an explanation), it isn't really nice, but it's the only way I found and in real life there always is a delay between press and release.
cd4b84b
to
0520f2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, thank you!
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/01c0a5cfa3cfe66/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/710ac11e3a09cfc/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/01c0a5cfa3cfe66/output.txt Total script time: 6.05 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/710ac11e3a09cfc/output.txt Total script time: 17.88 mins
|
In implementing caret browsing mode in pdf.js, I didn't notice that selectstart isn't always triggered.
So this patch removes the use of selectstart and rely only on selectionchange.
In order to simplify the selection management, the selection code is moved in the AnnotationUIManager:
I had to add a delay in the integration tests for highlighting (there's a comment with an explanation), it isn't really nice, but it's the only way I found and in real life there always is a delay between press and release.