Skip to main content

Bug Tracker

Side navigation

#15090 closed bug (migrated)

Opened May 13, 2014 08:18AM UTC

Closed October 21, 2014 12:42AM UTC

$.isPlainObject returns true for instance of $.Event

Reported by: San4esZ Owned by:
Priority: low Milestone: 2.2
Component: event Version: 2.1.1
Keywords: Cc:
Blocked by: Blocking:

Compare and Seems, that $.isPlainObject($.Event('click')) should return false in both samples.

Use case - jQuery 2.x breaks $.Event instance.

Attachments (0)
Change History (2)

Changed May 13, 2014 02:13PM UTC by dmethvin comment:1

component: coreevent
milestone: 2.next2.2
priority: undecidedlow
status: newopen

The docs say:

Properties that are an object constructed via new MyCustomObject(args), or built-in JavaScript types such as Date or RegExp, are not re-constructed and will appear as plain Objects in the resulting object or array. --

So expecting anything to maintain its constructedness in a deep-extend is not a good assumption.

However, the event object does seem to pass the .isPlainObject() test which seems wrong.

Changed October 21, 2014 12:42AM UTC by m_gol comment:2

resolution: → migrated
status: openclosed