Parcourir la source

Prevent the cursor from setting it to initial position in IE

Matthias Kurz il y a 11 ans
Parent
commit
dcabde40c3
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      select2.js

+ 3 - 0
select2.js

@@ -1221,6 +1221,9 @@ the specific language governing permissions and limitations under the Apache Lic
                 dropWidth = $dropdown.outerWidth(false);
                 enoughRoomOnRight = dropLeft + dropWidth <= viewPortRight;
                 $dropdown.show();
+
+                // fix so the cursor does not move to the left within the search-textbox in IE
+                this.focusSearch();
             }
 
             if (this.opts.dropdownAutoWidth) {