Issue 2364: Page scrolls up when clicking a line on diff page in Chrome 32
Status:  Submitted
Owner: ----
Closed:  Jan 2014
Reported by niklas.l...@gmail.com, Dec 24, 2013
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: (2.7-rc2-507-g1e7090b)

What steps will reproduce the problem?
1. Run Chrome Beta (I'm using 32.0.1700.68)
2. Go to diff view, for example https://gerrit.wikimedia.org/r/#/c/103072/5/resources/js/ext.translate.editor.js
3. Scroll down
4. (Double-)Click on any line, for example 999 on the right column

What is the expected output? What do you see instead?
I expect the line to be selected, or comment section opened for that line if double-clicked.

I observe that the screen scrolls upwards a lot and the line is selected if I scroll back down. I'm unable to open comment section for the correct line.


Please provide any additional information below.
In developer console I see:
body.scrollLeft is deprecated in strict mode. Please use 'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only if in quirks mode.
body.scrollTop is deprecated in strict mode. Please use 'documentElement.scrollTop' if in strict mode and 'body.scrollTop' only if in quirks mode.
Jan 10, 2014
Project Member #1 dougk....@gmail.com
I can confirm reproducing this on 32.0.1700.72, but 31.0.1650.63 (stable channel) does not have the problem.  I'm running 2.7 release (and change)... I can confirm the warning about body.scrollLeft and body.scrollTop only appears in the beta version of Chrome.
Jan 10, 2014
Project Member #2 dougk....@gmail.com
Could not reproduce this bug under Gerrit 2.8 using the old ChangeScreen, but it definitely seems to be related to the new version of Chrome with Gerrit 2.7.
Jan 10, 2014
Project Member #3 bklarson@gmail.com
Marking fixed in 2.8 for Doug
Status: Submitted
Labels: FixedIn-2.8
Jan 16, 2014
Project Member #4 dougk....@gmail.com
FYI, Chrome 32 seems to be rolling out to users slowly at this point, so you may experience this issue until you upgrade.  Workarounds appear to be clicking the line number or single clicking the line and using the "c" key to add a comment.
Jan 29, 2014
#5 the.brad...@gmail.com
This is related to quirks mode and how Chrome changed scrollTop. See: http://blogs.telerik.com/jefffritz/posts/14-01-17/chrome-updated-scrolltop for more info.