Open Bug 1326889 Opened 7 years ago Updated 2 years ago

Screenshot button on devtools toolbar scrolls long document to beginning

Categories

(DevTools :: Shared Components, defect, P4)

defect

Tracking

(Not tracked)

People

(Reporter: arni2033, Unassigned)

Details

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url   data:text/html,<style>body{height:32752px}
2. Scroll the page to the middle
3. Open devtools, enable "screenshot" toolbarbutton in devtools
4. Click on "screenshot" toolbarbutton


AR:  Page is scrolled to the very beginning. It's the whole outcome
ER:  Either X or Y
 X) Screenshot should be created
 Y) Page shouldn't scroll to the beginning
 Z) Browser should explain that it can't create screenshot


STR_2:  (reference of good behavior; difference in Step 1)
1. Open url   data:text/html,<style>body{height:32751px}
2. Scroll the page to the middle
3. Open devtools, enable "screenshot" toolbarbutton in devtools
4. Click on "screenshot" toolbarbutton

AR:  Screenshot is created. Page isn't scrolled to the beginning. Just as expected
No longer blocks: 1277113
Component: Untriaged → Developer Tools: Graphic Commandline and Toolbar
Product: Firefox → DevTools
Maybe a fix would be to capture the scroll position before setting it to 0,0 here:
https://dxr.mozilla.org/mozilla-central/source/devtools/shared/screenshot/capture.js#64

then restore it to where it was after capturing.
Component: Graphic Commandline and Toolbar → Shared Components
Priority: P2 → P4
Version: Trunk → unspecified
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.