Skip to main content

Search and Top Navigation

#9053 closed bug (duplicate)

Opened February 04, 2013 09:11AM UTC

Closed February 07, 2013 01:44AM UTC

:data selector fails when value is falsy

Reported by: linus.yan87 Owned by:
Priority: minor Milestone: none
Component: ui.core Version: 1.8.20
Keywords: Cc:
Blocked by: Blocking:

We can use .data(key, value) to save 0 and null on element. But we can't get the element with :data selector. Because for 0 and null, !!data(ele, key) is !!0 and !!null, and they both return false. So it failed to get the elements.

Attachments (0)
Change History (3)

Changed February 04, 2013 02:07PM UTC by tj.vantoll comment:1

status: newopen
summary: :data selector failed when value is 0 or null:data selector fails when value is falsy

Changed February 04, 2013 03:18PM UTC by scottgonzalez comment:2

I'm inclined not to change this and instead deprecate :data when #9030 lands.

Changed February 07, 2013 01:44AM UTC by scottgonzalez comment:3

resolution: → duplicate
status: openclosed

Duplicate of #5403.