|
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 | 'use strict'; |
6 | 6 |
|
7 | | -import * as DomUtils from 'vs/base/browser/dom'; |
8 | 7 | import {IDisposable, disposeAll} from 'vs/base/common/lifecycle'; |
9 | | -import {StandardMouseEvent} from 'vs/base/browser/mouseEvent'; |
| 8 | +import * as dom from 'vs/base/browser/dom'; |
10 | 9 | import {IframeUtils} from 'vs/base/browser/iframe'; |
| 10 | +import {StandardMouseEvent} from 'vs/base/browser/mouseEvent'; |
11 | 11 |
|
12 | 12 | export interface IStandardMouseMoveEventData { |
13 | 13 | leftButton:boolean; |
@@ -92,32 +92,32 @@ export class GlobalMouseMoveMonitor<R> implements IDisposable { |
92 | 92 |
|
93 | 93 | let windowChain = IframeUtils.getSameOriginWindowChain(); |
94 | 94 | for (let i = 0; i < windowChain.length; i++) { |
95 | | - this.hooks.push(DomUtils.addDisposableThrottledListener(windowChain[i].window.document, 'mousemove', |
| 95 | + this.hooks.push(dom.addDisposableThrottledListener(windowChain[i].window.document, 'mousemove', |
96 | 96 | (data:R) => this.mouseMoveCallback(data), |
97 | 97 | (lastEvent:R, currentEvent:MouseEvent) => this.mouseMoveEventMerger(lastEvent, currentEvent) |
98 | 98 | )); |
99 | | - this.hooks.push(DomUtils.addDisposableListener(windowChain[i].window.document, 'mouseup', (e:MouseEvent) => this.stopMonitoring(true))); |
| 99 | + this.hooks.push(dom.addDisposableListener(windowChain[i].window.document, 'mouseup', (e:MouseEvent) => this.stopMonitoring(true))); |
100 | 100 | } |
101 | 101 |
|
102 | 102 | if (IframeUtils.hasDifferentOriginAncestor()) { |
103 | 103 | let lastSameOriginAncestor = windowChain[windowChain.length - 1]; |
104 | 104 | // We might miss a mouse up if it happens outside the iframe |
105 | 105 | // This one is for Chrome |
106 | | - this.hooks.push(DomUtils.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseout', (browserEvent:MouseEvent) => { |
| 106 | + this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseout', (browserEvent:MouseEvent) => { |
107 | 107 | let e = new StandardMouseEvent(browserEvent); |
108 | 108 | if (e.target.tagName.toLowerCase() === 'html') { |
109 | 109 | this.stopMonitoring(true); |
110 | 110 | } |
111 | 111 | })); |
112 | 112 | // This one is for FF |
113 | | - this.hooks.push(DomUtils.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseover', (browserEvent:MouseEvent) => { |
| 113 | + this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseover', (browserEvent:MouseEvent) => { |
114 | 114 | let e = new StandardMouseEvent(browserEvent); |
115 | 115 | if (e.target.tagName.toLowerCase() === 'html') { |
116 | 116 | this.stopMonitoring(true); |
117 | 117 | } |
118 | 118 | })); |
119 | 119 | // This one is for IE |
120 | | - this.hooks.push(DomUtils.addDisposableListener(lastSameOriginAncestor.window.document.body, 'mouseleave', (browserEvent:MouseEvent) => { |
| 120 | + this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document.body, 'mouseleave', (browserEvent:MouseEvent) => { |
121 | 121 | this.stopMonitoring(true); |
122 | 122 | })); |
123 | 123 | } |
|
0 commit comments