mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(devtools): remove runOutsideAngular wrapper on mouse move event
This commit is contained in:
committed by
Minko Gechev
parent
1e52023fef
commit
e55a24cf30
@@ -2,7 +2,6 @@ import { initializeMessageBus } from 'ng-devtools-backend';
|
||||
import { SamePageMessageBus } from './same-page-message-bus';
|
||||
import { initializeExtendedWindowOperations } from './chrome-window-extensions';
|
||||
import { unHighlight } from '../../../ng-devtools-backend/src/lib/highlighter';
|
||||
import { runOutsideAngular } from '../../../ng-devtools-backend/src/lib/utils';
|
||||
|
||||
const messageBus = new SamePageMessageBus('angular-devtools-backend', 'angular-devtools-content-script');
|
||||
|
||||
@@ -27,15 +26,13 @@ messageBus.on('handshake', () => {
|
||||
|
||||
// handles case when mouse leaves chrome extension too quickly. unHighlight() is not a very expensive function
|
||||
// and has an if check so it's DOM api call is not called more than necessary
|
||||
runOutsideAngular(() => {
|
||||
document.addEventListener(
|
||||
'mousemove',
|
||||
() => {
|
||||
if (!inspectorRunning) {
|
||||
unHighlight();
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
});
|
||||
document.addEventListener(
|
||||
'mousemove',
|
||||
() => {
|
||||
if (!inspectorRunning) {
|
||||
unHighlight();
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user