Skip to content

Fix an Operation Aborted issue with IE 7/8 where the menu is called inline. #202

Closed
TechNickAI wants to merge 1 commit into
fnagel:selectmenufrom
krux:selectmenu
Closed

Fix an Operation Aborted issue with IE 7/8 where the menu is called inline. #202
TechNickAI wants to merge 1 commit into
fnagel:selectmenufrom
krux:selectmenu

Conversation

@TechNickAI
Copy link
Copy Markdown

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.

@fnagel
Copy link
Copy Markdown
Owner

fnagel commented Dec 14, 2011

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.

@fnagel
Copy link
Copy Markdown
Owner

fnagel commented Jan 16, 2012

Please give some feedback!

@TechNickAI
Copy link
Copy Markdown
Author

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

@fnagel
Copy link
Copy Markdown
Owner

fnagel commented Jan 18, 2012

Hey Nick!
Im not willing to implement a kind of workaround which "teaches" people wrong practices. Furthermore Im pretty sure there are some more problems when using this (or any other) widget without domready.

Felix

@TechNickAI TechNickAI closed this Jan 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants