Skip to content

Conversation

@zorkow
Copy link
Member

@zorkow zorkow commented Apr 14, 2021

This takes care of item 1 in #561 (comment)

Original problem was that key explorers where added to a node when they were switched on and removed when switched off.
Since only the last explorer was supposed to stop propagation of the key events, if the order was messed up, propagation might be stopped too early. (E.g., switch on speech, braille, keyboard magnificatio. Then switch off braille and speech, and switch on speech: magnification works, speech does not).

Now key explorers are attached only once and retain an attached flag. This ensure that the order of the explorers remains the same.

@zorkow zorkow requested a review from dpvc April 14, 2021 14:07
@dpvc dpvc added this to the 3.1.3 milestone Apr 14, 2021
Copy link
Member

@dpvc dpvc left a comment

Choose a reason for hiding this comment

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

It looks like the attached property is no longer being populated, but is still used. Can you check that that is as intended?

* @param {ExplorerMathDocument} document The current document.
*/
public attachExplorers(document: ExplorerMathDocument) {
this.attached = [];
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this.attached is no longer created or populated, but it is still used elsewhere in the code (in rerender() and updateDocument()). Is that still correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch.
I've now also made the more restarting more robust on collapsed elements. This only works with the latest fixes I made to SRE today.
There's still a minor kink to work out: When a collapse is triggered with the mouse while the key explorers are deeper in the tree they effectively refocus on a node that is no longer there. But that is for 3.2 to work out.
the refocus does not y

Copy link
Member Author

Choose a reason for hiding this comment

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

Solved that problem now. I will make a small PR once this PR is merged.

Copy link
Member

@dpvc dpvc left a comment

Choose a reason for hiding this comment

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

OK, looks good. I'll merge.

@dpvc dpvc merged commit 8e0d110 into develop Apr 16, 2021
@dpvc dpvc deleted the a11y_virtual_attached_keyexplorers branch April 16, 2021 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants