mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 16:00:59 +01:00
bf43d4cf2a
Summary: Fixes T10229. Broadly: - When the user hovers over a line number or inline comment, we update the yellow reticle to highlight the relevant lines. Specifically, this is in response to a `mouseover` event. - On touch devices, touches fire `mouseover` and if you mutate the DOM inside the event, the device aborts the touch. To remedy this: - Distingiush between mouse-originated and touch-originated cursor events. - We do this, roughly, by setting a flag when we see "touchstart", and clearing it when we see the second copy of any unique cursor event. - This method is complex, but should be robust to any implementation differences between devices (for example, it will work no matter which order the events are fired in). - This method should also produce the correct results on weird devices that have both mouse-devices and touch-devices available for cursor input. - When we see a touch-originated `mouseover` or `mouseout`, don't mutate the DOM. - Put an extra DOM mutation into the `click` event to improve highlighting behavior on touch devices. Test Plan: - In iOS Simulator (4s, iOS 9.2), clicked various inline actions ("Reply", "Hide", "Done", "Cancel", line numbers, etc). Got responses after a single touch. - Verified hover + click behavior on a desktop. - Logged and examined a bunch of events as a general sanity check. Reviewers: chad Reviewed By: chad Subscribers: aljungberg Maniphest Tasks: T10229 Differential Revision: https://secure.phabricator.com/D15136 |
||
---|---|---|
.. | ||
core | ||
docs | ||
ext | ||
lib | ||
LICENSE | ||
README |
Javelin is a performance-oriented Javascript library originally developed at Facebook. Learn more at <http://www.javelinjs.com/>. GETTING STARTED Eat a hearty breakfast. Breakfast is the most important meal of the day! WHAT IS JAVELIN? Javelin is a compact Javascript library built around event delegation. Its primary design goal is performance; it is consequently well-suited to projects where performance is very important. It is not as good for smaller scale projects where other concerns (like features or ease of development) are more important. PACKAGES Packages come in two flavors: "dev" and "min". The "dev" packages are intended for development, and have comments and debugging code. The "min" packages have the same code, but with comments and debugging information stripped out and symbols crushed. They are intended for use in production -- ha ha ha! FILES example/ Example code. LICENSE A thrilling narrative. pkg/ Ready-built Javelin packages. README Who knows? Could be anything. src/ Raw sources for Javelin. support/ Support scripts and libraries.