Skip to main content

Bug Tracker

Side navigation

#9815 closed bug (fixed)

Opened July 13, 2011 11:11AM UTC

Closed July 13, 2011 12:29PM UTC

Last modified June 10, 2012 05:01PM UTC

$.contains(element, textNode) always throws in IE8

Reported by: ykaul@opentext.com Owned by:
Priority: low Milestone: 1.6.3
Component: core Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Calling

jQuery.contains
with the second parameter being a text node, Internet Explorer 8 throws a "No such interface supported" exception.

The documentation for

$.contains
explicitely states that the second parameter can be any type of node; not just elements. So this should work and report whether the node is contained in element given through first parameter.

A test case can be found here: http://jsfiddle.net/JpYCA/

Attachments (0)
Change History (5)

Changed July 13, 2011 12:29PM UTC by dmethvin comment:1

resolution: → fixed
status: newclosed

Confirmed, in IE a.contains(b) throws the "No such interface supported" error when a is a normal DOM element and b is a text node. I don't believe there is anywhere that core depends on jQuery.contains for text nodes, so I have updated the documentation.

Changed July 13, 2011 12:30PM UTC by dmethvin comment:2

component: unfiledcore
milestone: None1.next
priority: undecidedlow

Changed August 26, 2011 02:30AM UTC by dmethvin comment:3

milestone: 1.next1.6.3

Changed January 18, 2012 09:54PM UTC by timmywil comment:4

#11189 is a duplicate of this ticket.

Changed June 10, 2012 05:01PM UTC by rwaldron comment:5

#11885 is a duplicate of this ticket.