IE8 Trouble Continued...Hangs on Dropdown Selection
2 min read
2 min read
The trouble seems to continue. In one of our apps, when clicking on a dropdown list, IE8 hang up completely. I quickly searched for similar problems and apparently IE has its issues with dropdowns. Anyway, here's a quick guide to a fix that worked for me.
After I got notified by one of our clients, I setup a virtual machine with XP and IE8 installed and indeed, I was able to successfully reproduce the odd behavior. Basically when opening the dropdown and selecting an entry the browser completely blocked.".nationList change": function (el, ev) {One of our devs used the highlighted line to extract the currently selected dropdown option. It's a rather complicated approach, but not wrong at all, at least it worked on the other browsers. The line seemed suspect to me and so I changed it to the much simpler jQuery alternative...
// current nation id
var nationId = el.context.selectedOptions[0].value;
//snip snip snip
}
......and see there, everything worked as expected and also IE8 didn't hang no longer. Don't ask me why this happened, but it seems to work now.
var nationId = $(el).val();
...