Side navigation
#10061 closed bug (duplicate)
Opened August 16, 2011 05:35AM UTC
Closed August 16, 2011 01:29PM UTC
Last modified March 14, 2012 08:36AM UTC
$.data fais in case of retrieving data from a dom element which is no longer in jQuery.cache
Reported by: | skhilko@gmail.com | Owned by: | skhilko@gmail.com |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | data | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The issue is described here http://www.datatables.net/forums/discussion/5644/issues-when-removing-datatables-from-the-dom-on-ie8/p1
It rather knotty but in short $.data fails when jquery-ui tries to trigger a "remove" event in it's own overridden $.cleanData function and fails on element which was already removed. This precondition looks like an invalid case, but the fix on jQuery side is pretty straight forward.
In line 1455 of full 1.6.2 sorces there is an if condition
if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) { return; }
there cache[ id ] is undefined so !cache[ id ][ internalKey ] fails with NPE.
Is it possible to add additional && cache[ id ] check before !cache[ id ][ internalKey ]?
Attachments (0)
Change History (5)
Changed August 16, 2011 05:44AM UTC by comment:1
component: | unfiled → data |
---|---|
owner: | → skhilko@gmail.com |
priority: | undecided → low |
status: | new → pending |
Changed August 16, 2011 06:45AM UTC by comment:2
status: | pending → new |
---|
Replying to [comment:1 addyosmani]:
Thanks for submitting a ticket. Could you provide us with a reduced test case replicating the behaviour mentioned on jsFiddle so we can investigate further?
Please, here you are http://jsfiddle.net/dbdkN/8/
Fails in IE8. After you run the example press "Reinit Table" button.
A error will be thrown:
Line: 1455
Error: 'undefined' in null or not an object
Changed August 16, 2011 01:29PM UTC by comment:3
milestone: | None → 1.6.3 |
---|---|
resolution: | → duplicate |
status: | new → closed |
Changed August 26, 2011 01:47AM UTC by comment:5
milestone: | 1.6.3 |
---|
Thanks for submitting a ticket. Could you provide us with a reduced test case replicating the behaviour mentioned on jsFiddle so we can investigate further?