Bug Tracker

Modify

Ticket #8476 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

Strange behavior with appendTo

Reported by: fguillot@… Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

Hello,

I'm trying to create my first jQuery plugin, a "game of fifteen" (taquin in french) and everything is fine except I have a very strange behavior when using the appendTo method.

Firebug throws the following exception : uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMDocumentFragment.appendChild]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame ::  http://code.jquery.com/jquery-1.5.1.js :: anonymous :: line 5636" data: no]

Here is a  test case. To reproduce the bug, click Start once, then Reset twice. It will trigger on the second reset (with any settings). Reset just rebuild the board game, keeping the same settings.

While debugging myself, I've noticed that on line 5558 of jQuery 1.5.1 (method "clean") there is this array created : "var ret = [];". When the bug triggers, if you put a break point after this line, the array is shown as empty in the firebug spy window, but if you open the spy, you can see that there are "1" in the array; one for each time the bug triggered. This is what drives jQuery crazy.

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

That is WAY too much code for a bug report.

It looks like you are trying to .load() HTML into an img element, which cannot have children.

If that is not the problem, or you have other questions, ask for help on forum.jquery.com.

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.