Bug Tracker

Modify

Ticket #7526 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

comment:1 follow-up: ↓ 2 Changed 3 years ago by jitter

  • Owner set to sankpand@…
  • Status changed from new to pending

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 3 years ago by jitter (previous) (diff)

comment:2 in reply to: ↑ 1 Changed 3 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.


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  How to report bugs

Version 0, edited 3 years ago by anonymous (next)

comment:3 Changed 3 years ago by jitter

  • Status changed from pending to closed
  • Resolution set to worksforme

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 3 years ago by jitter (previous) (diff)

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.