Regression 3.16 drag and drop blocks input #1784

Closed
mschipperheyn opened this Issue Apr 16, 2014 · 11 comments

Projects

None yet

7 participants

@mschipperheyn

Hi,

I'm seeing a regression in 3.16.0. I have a piece of code that allows a popup to be dragged around within the window pane. After the upgrade to 3.16.0 we started seeing problems with forms inside these popups not allows form fields to focus.

The symptom is that clicking on a form field doesn't focus it or allow keyboard input.

The code I'm using is:

Y.use('dd-plugin','dd-constrain',function(A){
that.plug(Y.Plugin.Drag,{handles:['.yui3-widget-hd']});
that.dd.plug(Y.Plugin.DDConstrained,{ constrain2node:'body' });
});

@triptych
Contributor

//cc @tilomitra

@tilomitra tilomitra self-assigned this Apr 17, 2014
@senseluo

I have the same issue too.

@tilomitra
Contributor

@ispyinternet I tried http://yapp.201digital.co.uk/dd-panel-3-16.html on my iPhone and I was able to focus on the dropdown. What behavior should I be expecting?

@mschipperheyn Could you put up a JSFiddle and tell me what browser it fails in so I can test it? I think this is related to the DD-Gestures changes introduced in 3.16.0.


UPDATE: Was able to replicate the issue (I was using Chrome 33 - had to upgrade to Chrome 34).

@tilomitra tilomitra added the need info label Apr 21, 2014
@tilomitra
Contributor

This bug was introduced when we decided to e.preventDefault() on Drag to prevent page selection. Here's a dirty fix while I try to come up with a better solution.

Add the following line to your JS:

Y.DD.Drag.prototype._handleMouseDownEvent = function(ev) {
       this.fire(EV_MOUSE_DOWN, { ev: ev });
};

Let me know how that works. I'll try to get a better fix in for the next release.

@tilomitra tilomitra removed the need info label Apr 21, 2014
@Jo90
Jo90 commented May 1, 2014

As expected the same issue with overlay and DD. Thanks for the workaround
Y.DD.Drag.prototype._handleMouseDownEvent = function(ev) {
this.fire(''drag:mouseDown'', { ev: ev });
};
I had to hardcode EV_MOUSE_DOWN

@Ventzy
Ventzy commented May 5, 2014

I hope this will be fixed in next release, as it makes my apps unusable.

@Jo90
Jo90 commented May 12, 2014

This is an example of how one of the examples is broken
http://yuilibrary.com/yui/docs/panel/panel-form-example.html

@triptych
Contributor

This is fixed in the 3.17.0 RC candidate: http://stage.yuilibrary.com/yui/docs/panel/panel-form-example.html

@triptych triptych closed this May 13, 2014
@ispyinternet

I have noticed that, related to this bug, contenteditable elements cannot attain focus. I have tested the stage example, and the fix does not address this.

@triptych
Contributor

@ispyinternet can you file an issue for that and cc me and Tilo? Thanks!

@tilomitra tilomitra was unassigned by jlecomte Mar 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment