8
0

scroll.md 1.2 KB

scrollViewportToShowTarget() helper

  1. Click the "Go to blue" button.

Expected: The viewport is scrolled to fully reveal the 80x80px blue square in the bottom-right corner.

  1. Scroll the viewport right and down just a little bit.
  2. Make sure the blue square is right in the bottom-right corner of the topmost div containing it. There should be only one set of scrollbars visible.
  3. Click "Go to red".

Expected: The viewport is scrolled to fully reveal the 80x80px red square in in the top area of the page.

  1. Scroll the viewport top and left just a little bit.
  2. Make sure the red square is right in the bottom-right corner of the topmost div containing it. There should be only one set of scrollbars visible.
  3. Click "Go to green".

Expected: The viewport is scrolled to fully reveal the 80x80px green square in in the bottom-left corner of the page.

  1. Scroll the viewport to the bottom and left just a little bit.
  2. Make sure the green square is right in the bottom-right corner of the topmost div containing it. There should be only one set of scrollbars visible.
  3. Click "Go to blue" to repeat the cycle.