Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#7355 closed bug (invalid)

wrapInner has no effect on IE8 — at Version 5

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Rick Waldron)

demonstrates what I believe to be a bug with wrapInner and IE8. (The fiddle makes use of jquery.ui.accordion, but this is only because that's how I noticed; the bug is with wrapInner.)

For an accordion to work correctly, the elements selected by the "header" parameter to .accordion() must have contents that meet a particular structure. Since this structure is not semantically meaningful, I wanted to create it on the fly rather than write it into the HTML. I do this with a call to wrapInner immediately before the invocation of accordion(). This works correctly on every other browser I've tried, but IE seems to silently ignore the wrapInner call. You can see that this is the case by comparing the rendered result pane in IE to that in any other browser - in IE the accordion headings are narrower, and the text is being drawn on top of the twisty triangles.

Change History (5)

comment:1 Changed 12 years ago by [email protected]

I should probably have said that I have only tried this in IE8 but rather expect it is a generic IE bug.

comment:2 Changed 12 years ago by jitter

This isn't bug as far as I'm concerned.

You pass in a string to wrapInner which isn't well formed HTML. Just changing it fixes your problem in IE. (Well atleast for me in IE6)

wrapInner("<a href=\"#\">") //doesn't work
wrapInner("<a href=\"#\" />") //works
wrapInner("<a href=\"#\"></a>") //works too

comment:3 Changed 12 years ago by [email protected]

OK, but then you should make it clearer in the documentation that, when passing a string, tags must be closed. Right now, the only thing that even slightly implies that is an example,

$('.inner').wrapInner('<div class="new" />');

which, when I read that, I assume the /> is a pointless XMLism and using just an opening tag is supposed to work.

comment:4 Changed 12 years ago by jitter

OK, but then you should make it clearer in the documentation

you who? I'm not on the jQuery team or anything like that. Just a user like you

comment:5 Changed 12 years ago by Rick Waldron

Description: modified (diff)
Keywords: docfix added
Resolution: invalid
Status: newclosed

thanks again jitter

Note: See TracTickets for help on using tickets.