From 197a2edc4ffb479e54158b7e6f4dcd9e204bdc05 Mon Sep 17 00:00:00 2001 From: Julie Wongbandue Date: Mon, 1 Oct 2018 14:44:11 -0400 Subject: [PATCH] include button in click --- build/iscroll.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/iscroll.js b/build/iscroll.js index 3c926627..359ebbed 100644 --- a/build/iscroll.js +++ b/build/iscroll.js @@ -257,7 +257,7 @@ var utils = (function () { var target = e.target, ev; - if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) { + if ( !(/(SELECT|INPUT|TEXTAREA|BUTTON)/i).test(target.tagName) ) { // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent // initMouseEvent is deprecated. ev = document.createEvent(window.MouseEvent ? 'MouseEvents' : 'Event'); @@ -769,7 +769,7 @@ IScroll.prototype = { this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0; this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0; - + if ( !this.hasHorizontalScroll ) { this.maxScrollX = 0; this.scrollerWidth = this.wrapperWidth; @@ -783,7 +783,7 @@ IScroll.prototype = { this.endTime = 0; this.directionX = 0; this.directionY = 0; - + if(utils.hasPointer && !this.options.disablePointer) { // The wrapper should have `touchAction` property for using pointerEvent. this.wrapper.style[utils.style.touchAction] = utils.getTouchAction(this.options.eventPassthrough, true); @@ -802,7 +802,7 @@ IScroll.prototype = { // INSERT POINT: _refresh - }, + }, on: function (type, fn) { if ( !this._events[type] ) {