ydshieh HF staff commited on
Commit
5c7fb2c
1 Parent(s): c0dd4c4

Update transcript-tracer.js

Browse files
Files changed (1) hide show
  1. transcript-tracer.js +6 -0
transcript-tracer.js CHANGED
@@ -537,7 +537,13 @@ function handleSelection() {
537
  var startNode = temp.baseNode;
538
  var wordElement = startNode.parentNode;
539
 
 
540
 
 
 
 
 
 
541
 
542
  var wordIndex = wordElement.dataset.ttWord;
543
 
 
537
  var startNode = temp.baseNode;
538
  var wordElement = startNode.parentNode;
539
 
540
+ console.log(wordElement.className);
541
 
542
+ while (wordElement.className == "tt-whitespace") {
543
+ wordElement = wordElement.nextElementSibling;
544
+ }
545
+
546
+ console.log(wordElement.className);
547
 
548
  var wordIndex = wordElement.dataset.ttWord;
549