<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>141199</bug_id>
          
          <creation_ts>2015-02-03 09:45:59 -0800</creation_ts>
          <short_desc>Range startContainer can&apos;t access parent 3 levels up in a contentEditable</short_desc>
          <delta_ts>2015-02-03 14:39:02 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brandon Andrews">sirisian</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1066462</commentid>
    <comment_count>0</comment_count>
    <who name="Brandon Andrews">sirisian</who>
    <bug_when>2015-02-03 09:45:59 -0800</bug_when>
    <thetext>So startContainer in the range object behaves rather funny. It&apos;s like a pseudo element. === randomly fails when comparing to the DOM element got by getElementById, but .isEqualNode will always work. This might be correct to the spec I&apos;m not sure, but one oddity in Webkit is that you can only access 2 parents up. If you do something like:

range.startContainer.parentNode.parentNode.parentNode it returns null. If you get the element startContainer is referencing and do element.parentNode.parentNode.parentNode it returns the correct DOM element. Very odd behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066529</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-02-03 12:40:54 -0800</bug_when>
    <thetext>Could you please attach a complete test case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066569</commentid>
    <comment_count>2</comment_count>
    <who name="Brandon Andrews">sirisian</who>
    <bug_when>2015-02-03 14:39:02 -0800</bug_when>
    <thetext>I actually started trying to make a test case after submitting the bug assuming it would be easy to reproduce in a jsfiddle. I can&apos;t seem to reproduce it in a small test case even with most of the code.

It&apos;s not really a big issue. I&apos;m sure someone else will be able to replicate it sometime in a smaller project. This project is so large it&apos;s hard to rip out everything to see what could be causing such odd behavior.

Sorry about that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>