From c186dc826e57d70eb9dc83d2310006395b2d00dd Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Tue, 3 Dec 2013 10:21:17 -0800 Subject: [PATCH] better handling for ipads. fixes #1949 --- .gitignore | 2 ++ select2.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..c6ef2182 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea + diff --git a/select2.js b/select2.js index 751815c0..27e69442 100644 --- a/select2.js +++ b/select2.js @@ -2039,7 +2039,7 @@ the specific language governing permissions and limitations under the Apache Lic } })); - selection.on("mousedown", "abbr", this.bind(function (e) { + selection.on("mousedown touchstart", "abbr", this.bind(function (e) { if (!this.isInterfaceEnabled()) return; this.clear(); killEventImmediately(e); @@ -2047,7 +2047,7 @@ the specific language governing permissions and limitations under the Apache Lic this.selection.focus(); })); - selection.on("mousedown", this.bind(function (e) { + selection.on("mousedown touchstart", this.bind(function (e) { if (!this.container.hasClass("select2-container-active")) { this.opts.element.trigger($.Event("select2-focus")); @@ -2062,7 +2062,7 @@ the specific language governing permissions and limitations under the Apache Lic killEvent(e); })); - dropdown.on("mousedown", this.bind(function() { this.search.focus(); })); + dropdown.on("mousedown touchstart", this.bind(function() { this.search.focus(); })); selection.on("focus", this.bind(function(e) { killEvent(e);