Bug Tracker

Modify

Ticket #9815 (closed bug: fixed)

Opened 2 years ago

Last modified 12 months ago

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

Reported by: ykaul@… Owned by:
Priority: low Milestone: 1.6.3
Component: core Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

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/

Change History

comment:1 Changed 2 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to fixed

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.

comment:2 Changed 2 years ago by dmethvin

  • Priority changed from undecided to low
  • Component changed from unfiled to core
  • Milestone changed from None to 1.next

comment:3 Changed 22 months ago by dmethvin

  • Milestone changed from 1.next to 1.6.3

comment:4 Changed 17 months ago by timmywil

#11189 is a duplicate of this ticket.

comment:5 Changed 12 months ago by rwaldron

#11885 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.