Fix Display._definitionTextScanner not ignoring certain elements (#1153)

This commit is contained in:
toasted-nutbread 2020-12-21 19:18:39 -05:00 committed by GitHub
parent abc017545c
commit 9dd2a9c98e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1772,6 +1772,8 @@ class Display extends EventDispatcher {
searchOnClick: true, searchOnClick: true,
searchOnClickOnly: true searchOnClickOnly: true
}); });
const excludeSelectors = ['.scan-disable', '.scan-disable *'];
this._definitionTextScanner.excludeSelector = excludeSelectors.join(',');
this._definitionTextScanner.prepare(); this._definitionTextScanner.prepare();
this._definitionTextScanner.on('searched', this._onDefinitionTextScannerSearched.bind(this)); this._definitionTextScanner.on('searched', this._onDefinitionTextScannerSearched.bind(this));
} }