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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23448</bug_id>
          
          <creation_ts>2013-10-07 16:59:41 +0000</creation_ts>
          <short_desc>Should setting scrollTop on root element really reset scrollLeft to 0?</short_desc>
          <delta_ts>2013-10-07 20:16:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSSOM View</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Antonio Gomes">tonikitoo</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          <cc>mike</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94395</commentid>
    <comment_count>0</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2013-10-07 16:59:41 +0000</bug_when>
    <thetext>http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop says:

&quot;
(...)
When setting the scrollTop attribute these steps must be run:
(...)
4 - If the element is the root element invoke scroll() with zero as first argument and y as second, and, if the given value is a ScrollOptionsVertical object, the given value as the third argument.
(...)
&quot;

This is not what browsers do, as one can see here running this sample here: http://jsfiddle.net/4bRQc/4/ . IE, Firefox, Opera 12 (pre-blink) and Safari nightly builds do not zero X when setting scrollTop on the root/documentElement node. Similarly, when setting scrollTop on body node, in quirks-mode.

ps: Blink/Opera work to match other engines, is under works.

Unless, this divergence between the spec description and web engines&apos; behavior is still relevant at this point, I propose wording it like:
&quot;4 - If the element is the root element invoke scroll() with *scrollX* as first argument and y as second, and, if the given value is a ScrollOptionsVertical object, the given value as the third argument.&quot;

That would also make step (4) to match step (5).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94404</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-10-07 20:16:29 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/csswg/rev/b79ac21fc79c

Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>