Opened 9 years ago
Closed 8 years ago
#15090 closed bug (migrated)
$.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: |
Description
Compare http://jsfiddle.net/San4es/Tkgt3/ and http://jsfiddle.net/San4es/Cst6V/. Seems, that $.isPlainObject($.Event('click')) should return false in both samples.
Use case http://jsfiddle.net/San4es/pA6Cd/ - jQuery 2.x breaks $.Event instance.
Change History (2)
comment:1 Changed 9 years ago by
Component: | core → event |
---|---|
Milestone: | 2.next → 2.2 |
Priority: | undecided → low |
Status: | new → open |
comment:2 Changed 8 years ago by
Resolution: | → migrated |
---|---|
Status: | open → closed |
Migrated to https://github.com/jquery/jquery/issues/1771
Note: See
TracTickets for help on using
tickets.
The docs say:
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.http://jsfiddle.net/pA6Cd/3/