Skip to content

Commit

Permalink
Clicking per mouse event.
Browse files Browse the repository at this point in the history
  • Loading branch information
zorkow committed Apr 22, 2021
1 parent d492e26 commit 1a79bb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts/a11y/explorer/KeyExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ export class SpeechExplorer extends AbstractKeyExplorer<string> {

/**
* Programmatically triggers a link if the focused node contains one.
* @param {number} code The keycode of the last key pressed.
*/
protected triggerLink(code: number) {
if (code !== 13) {
Expand All @@ -314,8 +315,7 @@ export class SpeechExplorer extends AbstractKeyExplorer<string> {
getAttribute('data-semantic-postfix')?.
match(/(^| )link($| )/);
if (focus) {
// Works for CHTML only.
node.parentElement.click();
node.parentNode.dispatchEvent(new MouseEvent('click'));
return true;
}
return false;
Expand Down

0 comments on commit 1a79bb1

Please sign in to comment.