Skip to main content

Bug Tracker

Side navigation

#8161 closed bug (duplicate)

Opened February 03, 2011 03:44PM UTC

Closed February 03, 2011 04:02PM UTC

Last modified February 03, 2011 06:24PM UTC

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.

Attachments (0)
Change History (5)

Changed February 03, 2011 03:46PM UTC by RwwL comment:1

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

Changed February 03, 2011 03:52PM UTC by RwwL comment:2

Replying to [comment:1 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.

Changed February 03, 2011 04:02PM UTC by rwaldron comment:3

component: unfiledmanipulation
priority: undecidedlow
resolution: → duplicate
status: newclosed

Changed February 03, 2011 04:02PM UTC by rwaldron comment:4

Duplicate of #8123.

Changed February 03, 2011 06:24PM UTC by jitter comment:5

milestone: 1.next1.5.1