@@ -10,6 +10,7 @@ import isJson from 'licia/isJson';
1010import contain from 'licia/contain' ;
1111import uniqId from 'licia/uniqId' ;
1212import nextTick from 'licia/nextTick' ;
13+ import pointerEvent from 'licia/pointerEvent' ;
1314import { getOrigin } from './util' ;
1415
1516const $document = $ ( document as any ) ;
@@ -169,7 +170,7 @@ export default class DevtoolsFrame {
169170 }
170171 private bindEvent ( ) {
171172 window . addEventListener ( 'resize' , this . resize ) ;
172- this . $draggable . on ( 'mousedown' , this . onResizeStart ) ;
173+ this . $draggable . on ( pointerEvent ( 'down' ) , this . onResizeStart ) ;
173174 }
174175 private onResizeStart = ( e : any ) => {
175176 e . stopPropagation ( ) ;
@@ -180,10 +181,12 @@ export default class DevtoolsFrame {
180181 this . $draggable . css ( {
181182 height : '100%' ,
182183 } ) ;
183- $document . on ( 'mousemove' , this . onResizeMove ) ;
184- $document . on ( 'mouseup' , this . onResizeEnd ) ;
184+ $document . on ( pointerEvent ( 'move' ) , this . onResizeMove ) ;
185+ $document . on ( pointerEvent ( 'up' ) , this . onResizeEnd ) ;
185186 } ;
186187 private onResizeMove = ( e : any ) => {
188+ e . stopPropagation ( ) ;
189+ e . preventDefault ( ) ;
187190 const deltaY = e . origEvent . clientY - this . startY ;
188191 this . setHeight ( this . originHeight - deltaY ) ;
189192 this . resize ( ) ;
@@ -192,8 +195,8 @@ export default class DevtoolsFrame {
192195 this . $draggable . css ( {
193196 height : 10 ,
194197 } ) ;
195- $document . off ( 'mousemove' , this . onResizeMove ) ;
196- $document . off ( 'mouseup' , this . onResizeEnd ) ;
198+ $document . off ( pointerEvent ( 'move' ) , this . onResizeMove ) ;
199+ $document . off ( pointerEvent ( 'up' ) , this . onResizeEnd ) ;
197200 } ;
198201 private resize = ( ) => {
199202 let { height } = this ;
0 commit comments