Revert "PERF: stop firing superfluous onSelectionChange"

This reverts commit fa96054acf.

Sadly this fails a test case, we may have to hunt up all the
parentElements to check for the cooked class to perform the
bypass
This commit is contained in:
Sam Saffron 2020-04-23 18:16:13 +10:00
parent fa96054acf
commit 8dccf0521c
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5
1 changed files with 2 additions and 8 deletions

View File

@ -188,16 +188,10 @@ export default Component.extend({
.on("mouseup.quote-button", () => {
this._prevSelection = null;
this._isMouseDown = false;
if (document.activeElement === document.body) {
onSelectionChanged();
}
onSelectionChanged();
})
.on("selectionchange.quote-button", () => {
if (
!this._isMouseDown &&
!this._reselected &&
document.activeElement === document.body
) {
if (!this._isMouseDown && !this._reselected) {
onSelectionChanged();
}
});