diff --git a/.circleci/config.yml b/.circleci/config.yml index ffbb4f1a7..5a88e4bf0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,11 +1,17 @@ -version: 2.0 +version: 2.1 +orbs: + browser-tools: circleci/browser-tools@1.4.8 jobs: build: docker: - - image: circleci/node:10.16-browsers + - image: cimg/node:16.20.2-browsers steps: + - browser-tools/install-browser-tools - checkout - + - run: | + node --version + java --version + google-chrome --version - restore_cache: keys: - v1-dependencies-{{ checksum "package.json" }} diff --git a/package.json b/package.json index 2685b9f94..2f6bc107f 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "rollup-plugin-babel": "^4.3.2", "rollup-plugin-json": "^4.0.0", "rollup-plugin-node-resolve": "^5.0.0", - "testcafe": "^1.3.1", - "testcafe-browser-provider-saucelabs": "^1.7.0", - "testcafe-reporter-xunit": "^2.1.0", + "testcafe": "^3.6.0", + "testcafe-browser-provider-saucelabs": "^3.0.0", + "testcafe-reporter-xunit": "^2.2.3", "uglify-js": "^3.5.12" }, "description": "JavaScript library for reorderable drag-and-drop lists on modern browsers and touch devices. No jQuery required. Supports Meteor, AngularJS, React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap.", diff --git a/src/Sortable.js b/src/Sortable.js index 81ff84494..1646dcaa1 100644 --- a/src/Sortable.js +++ b/src/Sortable.js @@ -429,10 +429,10 @@ function Sortable(el, options) { on(el, 'mousedown', this._onTapStart); on(el, 'touchstart', this._onTapStart); } - + this._handleEvent = this.handleEvent.bind(this) if (this.nativeDraggable) { - on(el, 'dragover', this); - on(el, 'dragenter', this); + on(el, 'dragover', this._handleEvent); + on(el, 'dragenter', this._handleEvent); } sortables.push(this.el); @@ -1678,8 +1678,8 @@ Sortable.prototype = /** @lends Sortable.prototype */ { off(el, 'pointerdown', this._onTapStart); if (this.nativeDraggable) { - off(el, 'dragover', this); - off(el, 'dragenter', this); + off(el, 'dragover', this._handleEvent); + off(el, 'dragenter', this._handleEvent); } // Remove draggable attributes Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {