Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#8161 closed bug (duplicate)

clone() api docs don't match behavior

Reported by: RwwL Owned by:
Priority: low Milestone: 1.5.1
Component: manipulation Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description

The API docs as of 1.5 say that withDataAndEvents and deepWithDataAndEvents both default to false. However, they're both defaulting to true (lines 5139 and 5140):

dataAndEvents = dataAndEvents == null ? true : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents :

If you call .clone() in 1.5 with no arguments, dataAndEvents is undefined, and undefined == null evaluates to true, so the default value winds up being true.

Not sure what the intent is, so I can't say if this is a typo in the docs are or of the code should change, but it seems like one of them should.

Change History (5)

comment:1 Changed 8 years ago by RwwL

Gah. Sorry for the crappy formatting in the ticket and the mangled last sentence.

comment:2 in reply to:  1 Changed 8 years ago by RwwL

Replying to RwwL:

Gah. Sorry for the crappy formatting in the ticket and the mangled last sentence.

AND sorry, I now see it's another duplicate of http://bugs.jquery.com/ticket/8123 -- don't know how I missed that, I really did try a search.

comment:3 Changed 8 years ago by Rick Waldron

Component: unfiledmanipulation
Priority: undecidedlow
Resolution: duplicate
Status: newclosed

comment:4 Changed 8 years ago by Rick Waldron

Duplicate of #8123.

comment:5 Changed 8 years ago by jitter

Milestone: 1.next1.5.1
Note: See TracTickets for help on using tickets.