mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 12:30:56 +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 |
||
---|---|---|
.. | ||
behavior-active-nav.js | ||
behavior-audio-source.js | ||
behavior-autofocus.js | ||
behavior-choose-control.js | ||
behavior-crop.js | ||
behavior-dark-console.js | ||
behavior-device.js | ||
behavior-drag-and-drop-textarea.js | ||
behavior-error-log.js | ||
behavior-fancy-datepicker.js | ||
behavior-file-tree.js | ||
behavior-form.js | ||
behavior-gesture.js | ||
behavior-global-drag-and-drop.js | ||
behavior-high-security-warning.js | ||
behavior-history-install.js | ||
behavior-hovercard.js | ||
behavior-keyboard-pager.js | ||
behavior-keyboard-shortcuts.js | ||
behavior-lightbox-attachments.js | ||
behavior-line-linker.js | ||
behavior-more.js | ||
behavior-object-selector.js | ||
behavior-oncopy.js | ||
behavior-phabricator-nav.js | ||
behavior-phabricator-remarkup-assist.js | ||
behavior-refresh-csrf.js | ||
behavior-remarkup-preview.js | ||
behavior-reorder-applications.js | ||
behavior-reveal-content.js | ||
behavior-scrollbar.js | ||
behavior-search-typeahead.js | ||
behavior-select-on-click.js | ||
behavior-time-typeahead.js | ||
behavior-toggle-class.js | ||
behavior-tokenizer.js | ||
behavior-tooltip.js | ||
behavior-watch-anchor.js | ||
behavior-workflow.js | ||
Busy.js | ||
DragAndDropFileUpload.js | ||
DraggableList.js | ||
FileUpload.js | ||
Hovercard.js | ||
KeyboardShortcut.js | ||
KeyboardShortcutManager.js | ||
MultirowRowManager.js | ||
Notification.js | ||
phtize.js | ||
Prefab.js | ||
ShapedRequest.js | ||
TextAreaUtils.js | ||
Title.js | ||
ToolTip.js |