This project is archived and is in readonly mode.

contains() not including textnodes
Reported by SamGoody | December 9th, 2010 @ 12:02 PM | in 1.4.0 (closed)
In 1.3, el.contains() appears not to recognize textnodes in
Webkit.
http://jsfiddle.net/M4aS7/
In Firefox, textnodes are found.
In Mootools 1.2x hasChild() would return true if the textnode is
a
child.
How do I check, in Webkit, if a textnode is included [or if an
ancestor exists to the textnode]?
Comments and changes to this ticket
-
Arian December 9th, 2010 @ 09:45 PM
- Milestone set to 1.3.1
- State changed from new to open
- Assigned user set to Valerio
- Tag changed from contains, slick to contains, slick, textnodes
- Milestone order changed from 849 to 0
-
Arian January 10th, 2011 @ 11:42 PM
- Assigned user changed from Valerio to Fábio M. Costa
-
Fábio M. Costa February 23rd, 2011 @ 03:33 AM
- Milestone changed from 1.3.1 to 1.4.0
- Milestone order changed from 10 to 0
This is a problem on Webkit's native implementation of contains.
We can make a feature detection for this special case and then use the native function.
Setting it for 1.3.2 -
ibolmo January 19th, 2012 @ 08:43 AM
- State changed from open to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »