Problem/Motivation
All drag and drop components seem broken on a new install on a touch-enabled laptop.
To reproduce:
- Install 8.0-alpha7 with Standard installation profile
- Go to Administration > Structure > Block layout
- Attempt to drag the System Help Block to an other block region.
Expected behavior:
The block gets moved to another region
What happened instead:
The block does not move. Drag and drop is broken.
Have tried this with Firefox 26 and Chrome 32
Proposed resolution
Current patch attempts removing conditional based on touch support detection.
Remaining tasks
Manually test before and after the patch using both mouse and touch in multiple browsers.
- Safari on iOS, Chrome on Linux with mouse, FF on Linux with mouse after patch: works fine (see #17)
- Chrome on Linux before patch with touch: ?
- Chrome on Linux after patch with touch: does not work (see #16)
- FF on Linux before patch with touch: ?
- FF on Linux after patch with touch: "goofy" (#16)
User interface changes
Ideally, tabledrag works on more devices.
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 2177293-any-inputs-19.patch | 2.45 KB | swentel |
| #15 | 2177293-any-inputs.patch | 2.43 KB | droplet |
Comments
Comment #1
nod_Can you test with the latest version? 8.x not the alpha?
It works on Firefox 26 for me.
Comment #2
korven commentedHi nod,
I did a checkout of 8.x from git just now, but still facing the same issue.
Here is a video showing the problem:
https://dl.dropboxusercontent.com/u/2758854/drag-drop-problem.mp4
Comment #3
nod_I see, try drag and dropping further than the header rows, like 50 pixels more than what you drag in the video :)
Comment #4
nod_Comment #5
korven commentedThat does not work either unfortunately.
I am using a touch enabled laptop (Lenovo Ideapad Yoga), and I know it tends to break some sliders (which assume you are a mobile device and switch to "flicking/touch" mode).
Could this also be an issue with the JS library used for dragging not having proper support for touch enabled devices that also have a mouse pointer?
Comment #6
nod_Oh I see, there is an issue with a patch about this somewhere, can't find it right now. I can just tell you it is a known bug and it is being addressed :)
Comment #7
korven commentedOk thanks for the info.
This issue perhaps?
https://drupal.org/node/1261002
Comment #8
nod_That one already made it in D8, so it'd be a follow-up of that one.
Actually it's #2175637: Touch support for the toolbar: greatly improves the UX of Toolbar on mobile devices, so issue is only for the toolbar, might be worth it to include tabledrag in the other issue scope.
Comment #9
lewisnyman@nod_ This doesn't seem to be the same problem as #2175637: Touch support for the toolbar: greatly improves the UX of Toolbar on mobile devices. This is a problem only affecting devices that support mouse and touch. The code implemented in #1261002: Draggable tables do not work on touch screen devices disables click if it detects touch. We are better off consolidating around a library like PointerEvents.
Comment #10
lewisnymanComment #11
sirclickalotForget touch devices, as far as I can see with a fresh D8 (alpha11) ALL drag 'n' drop across ALL elements of the administrative UI is broken; I cannot rearrange fields, menu items, blocks etc.
I've tried this in Chrome, Firefox but to my surprise, when I tried IE11 it works fine.
Clearly a major bug if I'm not mistaken and what I can't quite get my head around is how this is not being widely reported which rather leads me to think that it's somehow specific to my own set up but I've re-tested it on newly-reinstalled Windows 7 machine and I am correct, drag 'n' drop in the D8 interface appears not to work across the board in Chrome(34.0.1847.131 m) and Firefox (20.01) but DOES work fine on IE11.
???
Comment #12
lewisnymanComment #13
nod_Still the case?
Comment #14
droplet commentedThis is same issue as I raised in https://www.drupal.org/node/1261002#comment-7264972.
MS IE team published an article that fully explained why we should not only bind event to either Mouse / Touch events:
http://blogs.msdn.com/b/ie/archive/2014/09/05/making-the-web-just-work-w...
Comment #15
droplet commentedalso remove `modernizr` dependency
Comment #16
neclimdulSo I ran into this and tested the patch:
FF 39 Linux: mouse works. Touch is a bit goofy but I think it worked.
Chrome 43 linux: Mouse works. Touch I couldn't get to work but honestly I couldn't when it was only the touch event registered.
I'm not sure what the RTBC requirements are but as far as I'm concerned this is better then it was and the code looks about right so I'll be bold.
Comment #17
xjmThanks @neclimdul!
With #16 it sounds to me like it's not actually fixing the problem? Did you see a a difference before and after with FF?
Can you think of other similar operations you could test?
I think we should also probably confirm that IE still works. It'd be great if someone who previously reported the issue could test the patch as well. FWIW I tested the patch in Safari on iOS 8 and it works fine with or without the patch, but I not sure whether it even uses touch events so I don't know if that's helpful.
In light of #14, I checked whether there were other places in core making a similar check. Only things I found were this:
Both of those are just avoiding hover events on touch devices, so if there is something broken with them it'd be a separate bug at least.
Updating the summary with the manual testing we've had. I've left out #11 as it sounds like it could be a browser caching issue?
Also, should #1261002: Draggable tables do not work on touch screen devices be postponed until this is fixed?
Comment #18
swentel commentedNeeded a reroll
Had the same problem on a X1 carbon (ubuntu, but doesn't matter that match).
With this patch I can use the mouse now too (and I didn't even know I could actually touch and drag - which is insanely cool though)
Comment #19
swentel commentedmarking RTBC
Comment #20
xjmLooks like the other manual testing needed (per #17) was not documented; can we please include that testing before RTBC? At least we need confirmation that this patch is not regressing FF, Chrome, or IE on touch or non-touch devices. Thanks!
Comment #21
droplet commentedHi ALL
If you see any strange behaviours, please compare before & after. As I known, the touches are not smooth on mobile devices, so that in Desktop / Laptop should be same result. (Compare your desktop touch to mobile touch.)
If they're SAME result, it works. (Even it's not perfect, that's another issues we need to file.)
Comment #22
nod_Like droplet said. Touch interaction was always a bit weird. But mouse drag and drop was broken for keyboard/mouse+touch devices before the patch. After the patch using mouse works with keyboard/mouse+touch devices.
No change on the touch device front, works as before.
Tested on IE9, still works.
Comment #23
tim.plunkettComment #24
xjmDiscussed with @effulgentsia and we agreed on this being acceptable as an rc target. We could also fix this in a patch release. Thanks @nod_ and @droplet for clarifying.
Comment #26
xjmCommitted and pushed to 8.0.x since it also has signoff from two JS maintainers. Thanks!