Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenhunink authored Sep 5, 2021
1 parent ae25139 commit 9903d7d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/hyperaudio-lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ class HyperaudioLite {
let fNode = selection.focusNode.parentNode;
let aNode = selection.anchorNode.parentNode;

if(selection.focusNode.textContent == ' '){
fNode = selection.focusNode.nextElementSibling;
}

if(selection.anchorNode.textContent == ' '){
aNode = selection.anchorNode.previousElementSibling;
}

if (aNode.getAttribute('data-m') === null || aNode.className === 'speaker') {
aNode = aNode.nextElementSibling;
}
Expand Down

0 comments on commit 9903d7d

Please sign in to comment.