Closed
Bug 1160720
Opened 9 years ago
Closed 9 years ago
The color picker starts to follow the pointer if the pointer is pressed down and then released outside the tooltip frame (in the markup view)
Categories
(DevTools :: Inspector, defect)
Tracking
(firefox40 fixed)
RESOLVED
FIXED
Firefox 40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: sjakthol, Assigned: sjakthol)
Details
Attachments
(1 file, 1 obsolete file)
5.43 KB,
patch
|
sjakthol
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. Go to data:text/html;charset=utf-8,<div style="color: red">red 2. Inspect the red text 3. Click on the color swatch in the rule-view 4. Press mouse down to select a color and drag it 5. Drag the pointer outside the tooltip frame and release the mouse button 6. Move the pointer back inside the color picker and move it around What happens: The color changes constantly as the picker keeps following the mouse. What should happen: The picker should not follow the pointer if the mouse button is not pressed down. The spectrum [1] should probably check the buttons attribute of the mousemove [2] event to check if a button is still pressed as it can't receive mouseup events that happen outside the frame to abort the movement. [1] https://dxr.mozilla.org/mozilla-central/source/browser/devtools/shared/widgets/Spectrum.js#164 [2] https://w3c.github.io/uievents/#widl-MouseEvent-buttons
Assignee | ||
Comment 1•9 years ago
|
||
Here's a fix for this. It aborts the drag if there's no buttons pressed down on mousemove. The test in this patch is quite complex. I tried to write simpler one in shared/test/browser_spectrum.js but for some reason I wasn't able to get the widget to hear events sent via EventUtils there.
Assignee | ||
Comment 2•9 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d14449d40031
Comment 3•9 years ago
|
||
Comment on attachment 8600973 [details] [diff] [review] bug-1160720-color-picker-tooltip.patch Thanks Sami for working on this. Unfortunately I'll be off the rest of this week, and Brian should be a better reviewer than me for this since he's the author of the Spectrum widget.
Attachment #8600973 -
Flags: review?(pbrosset) → review?(bgrinstead)
Comment 4•9 years ago
|
||
Hi Sami, thanks for the patch. I'm not able to reproduce the problem (I've checked on osx, windows and linux while mousing up outside of the tooltip frame, and even outside of the entire browser window. The fix makes sense, but I'd like to narrow down exactly the scenario this happens in.
Flags: needinfo?(sjakthol)
Comment 5•9 years ago
|
||
Note: the test case does fails for me without the fix applied but I still can't figure out how to reproduce manually
Assignee | ||
Comment 6•9 years ago
|
||
Interesting. I can't reproduce this on Windows and now that you pointed it out I can't always reproduce it on Ubuntu 14.04 either. For example, if I release the button over the page content, this doesn't seem to happen. On Ubuntu 14.04 the best way I've figured out so far is to release the mouse button on top of the markup view. That seems to reliably reproduce the issue but it sure seems odd that it only happens on certain platforms and when the mouse is released at specific points. Or maybe this happens to me due to some setting I've toggled or an application I've installed. I'll check if I can reproduce this with stock Ubuntu 14.04 installation later.
Flags: needinfo?(sjakthol)
Comment 7•9 years ago
|
||
(In reply to Sami Jaktholm from comment #6) > Interesting. I can't reproduce this on Windows and now that you pointed it > out I can't always reproduce it on Ubuntu 14.04 either. > > For example, if I release the button over the page content, this doesn't > seem to happen. On Ubuntu 14.04 the best way I've figured out so far is to > release the mouse button on top of the markup view. OK, thanks for the info. I was able to reproduce by mousing up somewhere in the markup view on Ubuntu.
Updated•9 years ago
|
Summary: The color picker starts to follow the pointer if the pointer is pressed down and then released outside the tooltip frame → The color picker starts to follow the pointer if the pointer is pressed down and then released outside the tooltip frame (in the markup view)
Updated•9 years ago
|
OS: Unspecified → Linux
Comment 8•9 years ago
|
||
Comment on attachment 8600973 [details] [diff] [review] bug-1160720-color-picker-tooltip.patch Review of attachment 8600973 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Please update the commit message with r=bgrins
Attachment #8600973 -
Flags: review?(bgrinstead) → review+
Assignee | ||
Comment 9•9 years ago
|
||
Rebased patch with correct reviewer and updated commit message.
Attachment #8602172 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Attachment #8600973 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 10•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/019c10ffbe16
Keywords: checkin-needed
Comment 11•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/019c10ffbe16
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•