Permalink
Browse files

better handling for ipads. fixes #1949

  • Loading branch information...
1 parent abe7777 commit c186dc826e57d70eb9dc83d2310006395b2d00dd @ivaynberg ivaynberg committed Dec 3, 2013
Showing with 5 additions and 3 deletions.
  1. +2 −0 .gitignore
  2. +3 −3 select2.js
View
@@ -0,0 +1,2 @@
+.idea
+
View
@@ -2039,15 +2039,15 @@ 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);
this.close();
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);

0 comments on commit c186dc8

Please sign in to comment.