Check whether the mousedown event belonged to a valid drop target before preventing default #1778

Merged
merged 1 commit into from May 8, 2014

Projects

None yet

7 participants

@andrewnicols
Contributor

This issue affects 3.16.0 (yay).
Sorry for the spam on the previous issue. I have yet to get hub to make sensible pull requests against non-master branches.

@andrewnicols andrewnicols Check whether the mousedown event belonged to a valid drop target bef…
…ore preventing default
f89052f
@yahoocla

CLA is valid!

@andrewnicols
Contributor

Note, I did try and write some tests for this, but I'm not sure how best to simulate an actual mousedown. Simulate simulates the events rather than the actual mousedown so it's not possible to check whether the field was properly focused.

@triptych
Contributor

//cc @tilomitra for review?

@andrewnicols andrewnicols added a commit to andrewnicols/moodle that referenced this pull request Apr 22, 2014
@andrewnicols andrewnicols MDL-45226 AJAX: Backport upstream bug fixes from YUI
This backports the following two patches:
* yui/yui3#1757
* yui/yui3#1778
7c5ea49
@andrewnicols
Contributor

@tilomitra - any chance you can look at this. we have a release in around 2-3 weeks and I'd really like to backport this fix into our repo before then.

@andrewnicols
Contributor

Also note, this is a major breakage. Any page where DD is enabled will not be gesture scrollable by a touch-based device.

@Robert-Frampton

This also fixes a regression caused by 9f96abc where inputs cannot receive focus via mousedown if they are nested inside of a drag node (see here http://codepen.io/Robert-Frampton/pen/FhdmD).

@andrewnicols
Contributor

@Robert-Frampton that's exactly the bug it's fixing.

@andrewnicols
Contributor

@triptych, @tilomitra - any chance of a review on this - it's now been three weeks.

@marclundgren
Contributor

@andrewnicols +1 for this fix

@triptych
Contributor
triptych commented May 4, 2014

I asked @tilomitra to take a look. I'll follow up on Monday.

@tilomitra
Contributor

Hey guys - sorry I was heads-down on some stuff last week. Taking a look at this now @andrewnicols. Will get back to you by EOD.

@ezequiel
Member
ezequiel commented May 8, 2014

It's a shame this took so damn long to "review."

@andrewnicols,

Thanks. This looks great.

@ezequiel ezequiel merged commit f89052f into yui:dev-3.x May 8, 2014

2 checks passed

continuous-integration/travis-ci The Travis CI build passed
Details
default User has a valid Yahoo CLA
Details
@tilomitra
Contributor

Thanks @ezequiel. Been swamped :(

@MorrisR2 MorrisR2 added a commit to MorrisR2/moodle that referenced this pull request May 30, 2014
@andrewnicols @MorrisR2 andrewnicols + MorrisR2 MDL-45226 AJAX: Backport upstream bug fixes from YUI
This backports the following two patches:
* yui/yui3#1757
* yui/yui3#1778
cbf25a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment