yanickrochon / jquery.uix.multiselect

Completely rewritten, multiselect widget with a more concise API
http://mind2soft.com/labs/jquery/multiselect/
MIT License
139 stars 62 forks source link

IE and Safari with 'back' button -- wrong items selected #95

Open lwoodring opened 10 years ago

lwoodring commented 10 years ago

When a page is displayed that contains a multiselect widget, it displays correctly on 1st load. However, if the user then goes to another page, then back to the original page via the browser 'back' button -- the wrong items are then selected in IE 11 and Safari. (When using Firefox & Chrome, the correct items are selected.) Within IE 11 and Safari, it seems to select the 1st 'X' items in the list.

I found a couple references to the generic problem with how IE stores the 'index' into the list of items, as opposed to the 'value'..?..: http://forum.jquery.com/topic/jquery-select-box-selectedindex-problems-in-internet-explorer-ie-on-refresh-and-back-buttons https://bugzilla.mozilla.org/show_bug.cgi?id=282368

Is this a known issue? Is there a workaround?

lwoodring commented 10 years ago

Note that if I disable the call to $('#mySelect').multiselect(); -- and just let it render as a plain select input, the browsers do not have the issue.