Bug 117860 - REGRESSION(r145788): mouse drag on canvas shouldn't start selection
Summary: REGRESSION(r145788): mouse drag on canvas shouldn't start selection
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
Keywords: InRadar
Depends on: 112319
  Show dependency treegraph
Reported: 2013-06-20 19:54 PDT by Ryosuke Niwa
Modified: 2016-11-02 14:50 PDT (History)
9 users (show)

See Also:

Fixes the bug (5.76 KB, patch)
2013-06-20 20:30 PDT, Ryosuke Niwa
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-06-20 19:54:32 PDT
Example URL:

Steps to reproduce the problem:
1. Open the URL
2. Press mouse on the left half of canvas
3. Drag to the right half and release the mouse.
4. Keep pressing, dragging and releasing mouse on the right 
half on canvas.

What is the expected behavior?
Canvas should support mouse events. If you look into console, it should always print
(down, dragging*, up)* // pseudo regular expression

What went wrong?
Instead, after dragging over the middle of canvas, it gets selected and "mouseup" event does not work, it prints only
(down, dragging*)*
Comment 1 Radar WebKit Bug Importer 2013-06-20 19:55:17 PDT
Comment 2 Ryosuke Niwa 2013-06-20 20:30:02 PDT
Created attachment 205143 [details]
Fixes the bug
Comment 3 Ryosuke Niwa 2013-06-20 20:30:48 PDT
Comment on attachment 205143 [details]
Fixes the bug

I don't know what Chromium/Blink is doing to make mouse up not fire. That problem doesn't exist in WebKit.

However, we should still not select the canvas element.
Comment 4 Benjamin Poulain 2013-06-20 20:47:41 PDT
Comment on attachment 205143 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=205143&action=review

> LayoutTests/fast/events/mosuedrag-on-canvas-should-not-start-selection.html:11
> +description("This tests initiating a mouse drag on a canvas element doesn't start selection."
> +    + "To manually test, drag mouse on the canvas below. WebKit shouldn't select the canvas.")

Missing space between the sentences (or remove the +)
Comment 5 Ryosuke Niwa 2013-06-20 20:53:04 PDT
Committed r151822: <http://trac.webkit.org/changeset/151822>