From 940d1f2d671243d648bd94a0e4d41c3bb19ccda4 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Mon, 11 Feb 2013 20:31:18 -0500 Subject: [PATCH] Better imitate native touch experience --- select2.css | 1 + select2.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/select2.css b/select2.css index 4d95f32d..a4033812 100644 --- a/select2.css +++ b/select2.css @@ -309,6 +309,7 @@ Version: @@ver@@ Timestamp: @@timestamp@@ position: relative; overflow-x: hidden; overflow-y: auto; + -webkit-tap-highlight-color: rgba(0,0,0,0); } .select2-results ul.select2-result-sub { diff --git a/select2.js b/select2.js index 2754ae1a..cd875f67 100644 --- a/select2.js +++ b/select2.js @@ -648,7 +648,7 @@ the specific language governing permissions and limitations under the Apache Lic this.initContainerWidth(); installFilteredMouseMove(this.results); - this.dropdown.delegate(resultsSelector, "mousemove-filtered", this.bind(this.highlightUnderEvent)); + this.dropdown.delegate(resultsSelector, "mousemove-filtered touchstart touchmove touchend", this.bind(this.highlightUnderEvent)); installDebouncedScroll(80, this.results); this.dropdown.delegate(resultsSelector, "scroll-debounced", this.bind(this.loadMoreIfNeeded));