Bug Tracker

Opened 13 years ago

Closed 13 years ago

#7526 closed bug (worksforme)

there is bug in the html() method of the latest jquery.

Reported by: sankpand@… Owned by: sankpand@…
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

in the jquery 1.4.2, and 1.4.3, inside html(value){} method there is this[i].innerHTML = value that replace the innerHTML of this object with value, and this is causing issue in case when we have table element inside the div element (like <div><table></table></div>). what it does is finally it separates the div and table elements as (<div></div> <table></table> this needs to be changed to this[i].html(value).

Change History (3)

comment:1 Changed 13 years ago by jitter

Owner: set to sankpand@…
Status: newpending

Please submit a reduced test case which reproduces the issue you are experiencing (ideally on http://jsFiddle.net). So that we can investigate this issue further.


How to report bugs

Last edited 13 years ago by jitter (previous) (diff)

comment:2 in reply to:  1 Changed 13 years ago by anonymous

Replying to jitter:

Please submit a reduced test case which reproduces the issue you are experiencing (ideally on http://jsFiddle.net). So that we can investigate this issue further.


How to report bugs

please use the example http://jsfiddle.net/xGKsT/ , but this is reproducible only on mozilla 3.6. Please use same kind of example as given on link, the result will be that div and table will get separated

Last edited 13 years ago by jitter (previous) (diff)

comment:3 Changed 13 years ago by jitter

Resolution: worksforme
Status: pendingclosed

Thanks for providing a test case. I tried your test case in FF 3.6.12 on Windows XP with jQuery 1.4.2/1.4.3/1.4.4 but I couldn't reproduce the bug you described.

Maybe there is a misunderstanding on the working of html() (api docs)

Get the HTML contents of the first element in the set of matched elements.

Check my updated test case which shows that after using html() the html of .replace and .result are identical. http://jsfiddle.net/xGKsT/1/

If there is no misunderstanding on html() and you still think there is a bug please report back and provide more information on your platform and exact FF version or anything other we might need to reproduce the bug.

P.S.: The next time please don't post as anonymous but instead with the same credentials as when you opened the ticket, else the ticket status doesn't change and we might miss your contribution.

Last edited 13 years ago by jitter (previous) (diff)
Note: See TracTickets for help on using tickets.