Fix an Operation Aborted issue with IE 7/8 where the menu is called inline. #202
Fix an Operation Aborted issue with IE 7/8 where the menu is called inline. #202TechNickAI wants to merge 1 commit into
Conversation
…body> isn't closed yet, IE barfs. See http://support.microsoft.com/kb/927917
|
All jQuery UI widgets need to be called within a domReady event or similar. Why do you want to init selectmenu without a domready? I must confess Im not willing to fix atm. Seems not like a technical problem but a usage problem to me. |
|
Please give some feedback! |
|
I found it difficult to argue that the code should work without being wrapped in a $(document).ready() block, because you are correct, that's indeed standard practice. However, my change was small, had no adverse side affects, and addresses this implementation, making it easier for people to implement. -Nick |
|
Hey Nick! Felix |
Since the body isn't closed yet, IE 7/8 barfs if this is called inline instead of via $(document).ready(). More information on why Microsoft doesn't allow you to append to elements before they are closed: See http://support.microsoft.com/kb/927917
Note that this is fixed in IE 9, and does not show up when using the IE 7/8 compatibility mode. You must be running the actual IE 7/8.
Simple use case to replicate: http://pastebin.com/7sgERvpN
This patch fixes the problem by delaying the appending of the hidden ul list to the body until after document.ready(), and it solved our problems.