Skip to content

Commit

Permalink
Merge pull request #4840 from inception-project/bugfix/4839-Scrolling…
Browse files Browse the repository at this point in the history
…-to-selection-does-sometimes-not-work-in-Apache-Annotator-Editor

#4839 - Scrolling to selection does sometimes not work in Apache Annotator Editor
  • Loading branch information
reckart authored May 31, 2024
2 parents 837d762 + 8c2e1c4 commit 26d1d1a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ export class ApacheAnnotatorVisualizer {

window.clearTimeout(this.removeTransientMarkersTimeout)
this.removeTransientMarkers.forEach(remove => remove())
this.root.normalize() // https://github.com/apache/incubator-annotator/issues/120

const removeScrollMarker = highlightText(range, 'mark', { id: 'iaa-scroll-marker' })
this.removeTransientMarkers = [removeScrollMarker]
Expand Down Expand Up @@ -469,6 +470,7 @@ export class ApacheAnnotatorVisualizer {
this.removeTransientMarkersTimeout = window.setTimeout(() => {
this.removeTransientMarkers.forEach(remove => remove())
this.removeTransientMarkers = []
this.root.normalize() // https://github.com/apache/incubator-annotator/issues/120
}, 2000)
}

Expand Down

0 comments on commit 26d1d1a

Please sign in to comment.