Changeset 242566 in webkit
- Timestamp:
- Mar 6, 2019 2:28:27 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r242562 r242566 1 2019-03-06 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: TimelineOverview clicks do not always behave as expected 4 https://bugs.webkit.org/show_bug.cgi?id=195319 5 6 Reviewed by Devin Rousso. 7 8 * UserInterface/Views/TimelineRuler.js: 9 (WI.TimelineRuler.prototype._shouldIgnoreMicroMovement): 10 (WI.TimelineRuler.prototype._handleMouseDown): 11 (WI.TimelineRuler.prototype._handleMouseMove): 12 Ignore moves that haven't gone more than 4px. Once the threshold is 13 passed allow all moves. This improves the click behavior since 14 previously click would never re-dispatch if there was any movement. 15 1 16 2019-03-06 Joseph Pecoraro <pecoraro@apple.com> 2 17 -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js
r242194 r242566 747 747 } 748 748 749 _shouldIgnoreMicroMovement(event) 750 { 751 if (this._mousePassedMicroMovementTest) 752 return false; 753 754 let pixels = Math.abs(event.pageX - this._mouseStartX); 755 if (pixels <= 4) 756 return true; 757 758 this._mousePassedMicroMovementTest = true; 759 return false; 760 } 761 749 762 _handleClick(event) 750 763 { … … 798 811 this._mouseMoved = false; 799 812 813 this._mousePassedMicroMovementTest = false; 814 this._mouseStartX = event.pageX; 815 800 816 this._mouseMoveEventListener = this._handleMouseMove.bind(this); 801 817 this._mouseUpEventListener = this._handleMouseUp.bind(this); … … 812 828 { 813 829 console.assert(event.button === 0); 830 831 if (this._shouldIgnoreMicroMovement(event)) 832 return; 814 833 815 834 this._mouseMoved = true;
Note: See TracChangeset
for help on using the changeset viewer.