Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

IE11 bugfix causes issues with tab order #877

Closed

Description

@sb-relaxt-at

In IE 11.0 tabbing through Selectize fields is broken, try this example, focus the first field and then press tab. It should now focus the second selectize (note that there are even added tabindex properties).

The reason seems to be the bugfix for "IE11 bug: element still marked as active" in onBlur:

(dest || document.body).focus();

This causes the document's body to be focused. Removing this line resolves the issue (see this fiddle), but I am not aware about the reason why this line has been added (and what issue it is trying to fix).

Activity

  1. jods4 commented on Nov 3, 2015

    @jods4

    This "bugfix" does indeed create a bug which prevent proper keyboard navigation in IE11.
    Removing the lines makes tab navigation work.

    BUT it breaks "activate/focus" management in IE11. I noticed without this line that if you click in another textbox when selectize has focus, although the textbox seems focused the proper "activate/focus" events are not raised, which can cause problems, e.g. if your target textbox hosts a JS date picker.

    So I'm looking for something that would fix both issues!

  2. jods4 commented on Nov 3, 2015

    @jods4

    #406 seems to be the reason why this line of code is here.

  3. jods4 commented on Nov 3, 2015

    @jods4

    OK I fixed it by changing this line:

    (dest || document.body).focus();
    

    to:

    dest && dest.focus();
    

    i.e. I'm only focusing the next control if I know one (which fixes the "no activate/focus on click" issue and let it go otherwise (which fixes tab navigation).

    As far as I can tell it works nicely. Because I don't fully grasp what was creating the original problem (broken keyboard navigation), I can't say I'm 100% confident this change doesn't have adverse side-effects.

  4. sb-relaxt-at commented on Nov 3, 2015

    @sb-relaxt-at
    Author

    Thanks for your efforts. I will try this modified solution in our current usage scenario.

  5. brownbl1 commented on Dec 16, 2015

    @brownbl1

    I've also tried this proposed fix and it has solved our IE bug as well, FWIW. I haven't done thorough testing though.

  6. bwilson-ux commented on Feb 2, 2016

    @bwilson-ux
    Contributor

    Perfect resolution - current project I am working on requires numerous instances of the selectize menu. This proposed fix works very well. 👍

  7. sb-relaxt-at commented on Mar 3, 2016

    @sb-relaxt-at
    Author

    Just realized that I had patched it that way back in August. From my point of view it is working fine too.

  8. joallard commented on May 28, 2016

    @joallard
    Member

    Closed by #997, thanks all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions