New issue
Advanced search Search tips

Issue 659491 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Clicking on "send now" in about:crashes scrolls to the top

Project Member Reported by phistuck@gmail.com, Oct 26 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

Steps to reproduce the problem:
1. Go to about:crashes.
2. Make sure you have more crashes than the viewport can show. About twice the viewport.
3. Scroll to the bottom.
4. Click on "send now" next to an unsent crash.

What is the expected behavior?
The page will keep its scrolling position (or scroll up a bit if the scroll height is now lower, obviously).

What went wrong?
The page scroll to the top.

Did this work before? N/A 

Chrome version: 54.0.2840.71  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 23.0 r0
 
Components: -UI UI>Browser>WebUI
Status: Untriaged (was: Unconfirmed)
I imagine the list is repopulated after clicking on "send now", so the height is 0 at some point and so the scrolling position is reset.

Comment 2 by phistuck@gmail.com, Nov 11 2016

It should be a small change -
File - src/components/crash/core/browser/resources/crashes.js
  $('disabledMode').hidden = enabled;
  $('crashUploadStatus').hidden = !enabled || !dynamicBackend;
  
+  // Make the height fixed while clearing the
+  // element in order to maintain scroll position.
+  crashSection.style.height = getComputedStyle(crashSection).height;

  // Clear any previous list.
  crashSection.textContent = '';

...
    crashSection.appendChild(crashBlock);
  }

+  // Reset the height, in order to accommodate for the new content.
+  crashSection.style.height = "";

  $('noCrashes').hidden = crashes.length != 0;

Comment 3 by treib@chromium.org, Dec 12 2016

Cc: rsesek@chromium.org
Cc: gayane@chromium.org scottmg@chromium.org
scottmg, gayane - care to submit those changes? Thank you, anyway.

Comment 5 by napper@chromium.org, Dec 12 2016

Owner: jiameng@chromium.org

Comment 6 by napper@chromium.org, Dec 12 2016

Status: Assigned (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c849cb75f6f4f9a13e376006cbfb6da8c5d34faf

commit c849cb75f6f4f9a13e376006cbfb6da8c5d34faf
Author: jiameng <jiameng@chromium.org>
Date: Fri Dec 16 04:29:22 2016

Fix a scroll-position issue on about:crashes.

Clicking on "Send Now" should not scroll to the top.

This cl patches in the solution devised by phistuck@gmail.com. See  bug 659491  for detail.

BUG= 659491 

Review-Url: https://codereview.chromium.org/2580543002
Cr-Commit-Position: refs/heads/master@{#439022}

[modify] https://crrev.com/c849cb75f6f4f9a13e376006cbfb6da8c5d34faf/components/crash/core/browser/resources/crashes.js

Comment 8 by phistuck@gmail.com, Dec 16 2016

Thank you!
Status: Fixed (was: Assigned)

Sign in to add a comment