[improvement] check event.cancelable before preventDefault
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { use } from '../utils';
|
||||
import { TouchMixin } from '../mixins/touch';
|
||||
import { preventDefault } from '../utils/event';
|
||||
|
||||
const [sfc, bem] = use('slider');
|
||||
|
||||
@@ -36,8 +37,7 @@ export default sfc({
|
||||
},
|
||||
|
||||
onTouchMove(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
preventDefault(event, true);
|
||||
|
||||
if (this.disabled) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user