|
@@ -24,7 +24,7 @@ function mapTags(tag) {
|
|
|
}
|
|
|
|
|
|
let lastMeaningfulNode = null
|
|
|
-function extractTextForMagnify(e) {
|
|
|
+function extractTextForMagnify(e, allowRepeatd = false) {
|
|
|
let meaningfulNode = e.path[0]
|
|
|
|
|
|
if (e.type === 'mouseover') {
|
|
@@ -69,10 +69,12 @@ function extractTextForMagnify(e) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (meaningfulNode === lastMeaningfulNode) {
|
|
|
- return
|
|
|
+ if (!allowRepeatd) {
|
|
|
+ if (meaningfulNode === lastMeaningfulNode) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ lastMeaningfulNode = meaningfulNode
|
|
|
}
|
|
|
- lastMeaningfulNode = meaningfulNode
|
|
|
|
|
|
let elemType = ''
|
|
|
const ariaLabel = meaningfulNode.getAttribute('aria-label')
|