Skip to content

Commit

Permalink
avoid search when tapping on popup clickable components
Browse files Browse the repository at this point in the history
  • Loading branch information
khaitruong922 committed Sep 19, 2024
1 parent d571bd9 commit d46f3ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/js/language/text-scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -1664,8 +1664,9 @@ export class TextScanner extends EventDispatcher {
*/
_createExcludeSelectorForPointerType(excludeSelector, pointerType) {
if (pointerType === 'touch') {
const extraSelector = '.gloss-link,.gloss-link *';
return excludeSelector ? `${excludeSelector},${extraSelector}` : extraSelector;
// Avoid trigger search with tapping on popup link, tag and inflection.
const popupClickableSelector = '.gloss-link, .gloss-link *, .tag, .tag *, .inflection';
return excludeSelector ? `${excludeSelector},${popupClickableSelector}` : popupClickableSelector;
}
return excludeSelector;
}
Expand Down

0 comments on commit d46f3ee

Please sign in to comment.