Skip to content
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] Fix multi-selection on touch screens #15211

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

calixteman
Copy link
Contributor

No description provided.

@calixteman
Copy link
Contributor Author

I tested the patch with a touch screen and everything works nice now.

Comment on lines 741 to 745
/**
* Add an editor the current selection.
* @param {AnnotationEditor} editor
*/
addToSelection(editor) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a slightly misleading method name, since it either adds or removes a selection below. So, how about the following instead?

Suggested change
/**
* Add an editor the current selection.
* @param {AnnotationEditor} editor
*/
addToSelection(editor) {
/**
* Add or remove an editor in the current selection.
* @param {AnnotationEditor} editor
*/
toggleSelected(editor) {

this.#selectedEditors.add(editor);
editor.select();
this.#dispatchUpdateUI(editor.propertiesToUpdate);
this.#dispatchUpdateStates({
hasSelectedEditor: this.hasSelection,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably be simplified to just the following, since the add-call above should guarantee that this.hasSelection === true:

Suggested change
hasSelectedEditor: this.hasSelection,
hasSelectedEditor: true,

@calixteman
Copy link
Contributor Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/27eebe327f1a7ec/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/aea35f64ba74e6a/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/27eebe327f1a7ec/output.txt

Total script time: 4.76 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/aea35f64ba74e6a/output.txt

Total script time: 7.09 mins

  • Integration Tests: FAILED

@Snuffleupagus
Copy link
Collaborator

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/4f625d0c79ee766/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/cfd2462eae303ca/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/4f625d0c79ee766/output.txt

Total script time: 4.62 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/cfd2462eae303ca/output.txt

Total script time: 6.75 mins

  • Integration Tests: FAILED

@Snuffleupagus Snuffleupagus merged commit bf00068 into mozilla:master Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants