1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 09:48:47 +02:00
Commit graph

7 commits

Author SHA1 Message Date
epriestley
ea67a8ab8e Make scrolling happen relative to the main content frame
Summary: Fixes T7033. When we've reframed the main page content we need to scroll relative to the containing frame, not relative to the window.

Test Plan:
In Safari, Chrome and Firefox, used j/k/J/K keys to navigate diff content.

Tried some other scroll-based beahviors, like jump-to-anchors.

(It looks like the highlighting reticle got slightly derped a while ago, but it's still functional, so I didn't mess with it.)

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T7033

Differential Revision: https://secure.phabricator.com/D11490
2015-01-25 08:42:40 -08:00
epriestley
e0289070db Fix window-exiting drags and drag-and-hold behaviors in JX.Scrollbar
Summary:
Fixes two issues:

  - In Firefox, dragging outside the window and releasing the mouse button would miss the `mouseup` event. This would leave the bar dragging, even though the user had released the mouse button.
  - In all browsers, dragging the handle and then holding your cursor in one place for more than a second would hide the handle. Instead, never hide the handle during a drag.

Test Plan:
  - In Firefox, dragged handle right (outside of window) and released mouse button. Waved cursor over window; no more "sticky" scroll.
  - In FF/Chrome/Safari, dragged handle and held cursor in same position for several seconds. No more handle hide.
  - Waved cursor over window and made sure normal hiding still works.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11487
2015-01-24 16:42:21 -08:00
epriestley
6288d8a7d4 Support scrollbar snapback on Windows
Summary: See D11472. I eyeballed the "140" number by screenshotting / measuring in Paint.

Test Plan: Made the snapback thing return `true` and got snapback on OSX.

Reviewers: chad

Reviewed By: chad

Subscribers: avivey, epriestley

Differential Revision: https://secure.phabricator.com/D11485
2015-01-24 14:57:12 -08:00
epriestley
4ceaaf5ea1 Allow scrollbars to be dragged outside the window on supporting browsers
Summary: In Safari, Firefox and Chrome drags outside the window will work if we do this. Safari didn't work before, not sure about the other two.

Test Plan: Clicked the scroll handle, then dragged my mouse to the right (outside the window) and down. Page scrolled in Safari, Firefox, and Chrome.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11484
2015-01-24 14:18:33 -08:00
epriestley
25fc168c95 Fix an issue with dragging the scrollbar handle from a noninitial position
Summary:
See <rPc40bc0c8bf75#4050>. Repro steps:

  - Scroll partway down the page.
  - Click and drag the scroll handle.

Prior to this diff, the handle incorrectly jumps back to the top of the page. This is because we didn't store the handle's original position. (In testing, I always dragged from near the top of the page, and I don't normally drag scrollbars, so I didn't notice this.)

Test Plan: Clicking and dragging a partially scrolled handle now works correctly.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11483
2015-01-24 14:00:41 -08:00
epriestley
512b173618 Don't activate JX.Scrollbar if we don't need to
Summary:
See discussion on rPc40bc0c8bf75. Fixes a couple of glitchy things:

  - Things were generally not nice on iOS.
  - On OSX, with no mouse, the OS scrollbar and our fake scrollbar would both draw.
  - Bar z-index was not set quite correctly.

Specifically, check if we need these bars. If we don't, just exit immediately and use the OS bars.

Test Plan:
  - Tested Safari, Firefox, Chrome with and without a mouse.
  - Tested iOS Simualtor.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11480
2015-01-23 18:22:47 -08:00
epriestley
c40bc0c8bf Replace the primary scrollbar with a fake one to prepare for a persistent chat column
Summary:
Ref T7014. With a mouse plugged in, multi-panel UIs are pretty hideous on OSX. This is somewhat offputting for me in Conpherence, and really jumps out at me with the new column mocks in T7014.

Sites like Twitch and Facebook approach this by emulating the touchpad scrollbar to achieve a more aesthetic UI. Use a similar approach.

This:

  - Replaces the main scrollbar with a prettier fake one.
  - This prepares the standard page frame for a persistent chat column.

Test Plan:
  - Seems to work properly on OSX, Chrome and Firefox. Haven't tested on IE; my Windows setup is pretty iffy at the moment.
  - Tried Conpherence.
  - Tried Workboards.

Reviewers: btrahan, chad

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7014

Differential Revision: https://secure.phabricator.com/D11472
2015-01-23 13:29:15 -08:00