Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Plone 4 all tiles can be dragged in the view template (have ui-draggable/droppable) #710

Closed
fredvd opened this issue May 5, 2017 · 6 comments · Fixed by #711
Closed
Assignees
Labels

Comments

@fredvd
Copy link
Member

fredvd commented May 5, 2017

After installing 1.4b1 in a custom project and verifying the same behaviour in the collective.cover buildout: all outer tile divs now have ui-draggable and ui-droppable classes.

When you view a cover page you can now no longer select any text inside a cover as you activate the draggable behaviour and visitors can drag around tiles around the page (that will snap back as soon they release the mouse button).

A quick search through the collective.cover code doesn't show any ui-draggable/droppable in templates or javascript, so I suspect this regression is coming from a higher pinned support package, plone.app.tiles or plone.app.blocks .

@hvelarde
Copy link
Member

hvelarde commented May 5, 2017

CC @rodfersou @datakurre

@hvelarde hvelarde added the bug label May 5, 2017
@fredvd
Copy link
Member Author

fredvd commented May 5, 2017

Digging a bit more in this, I cannot find draggable/droppable strings in p.a.blocks/p.a.tiles either and disabling javascript in the browser removes the classes from the div, so there is some javascript running that adds these classes on the client. Still haven't found the cause though. ui-draggable/droppable come from jquery-ui......

@fredvd
Copy link
Member Author

fredvd commented May 5, 2017

It's not caused by plone.app.blocks/tiles, sorry for the confusion.

When I disable contenchooser.js in portal_javascript it stops ui-draggable/ui-droppable being added on the tiles in view mode. contentchooser.js is always loaded, not only in compose mode. Was this maybe changed when the contenchooser.js is activated?

@rodfersou @hvelarde contenchooser.js hasn't changed much since end 2015 (where drag/drop between tiles was added, but not the tiles themselves). I've been looking for obvious changes but cannot find them. Any ideas?

@fredvd
Copy link
Member Author

fredvd commented May 5, 2017

https://github.com/collective/collective.cover/blob/master/src/collective/cover/static/js/contentchooser.js#L372 causes all tiles to get a ui-draggable class. @rodfersou Why is this necessary on tile level when the drag-drop functionality should be for (list) elements between tiles?

Still strange, because I cannot remember seeing this bug since switching to 1.4b1, so maybe some other change is triggering this.

@hvelarde
Copy link
Member

hvelarde commented May 5, 2017

that is related with the drag-and-drop among tiles feature added for #487; I have no idea if it is indeed needed.

@fredvd
Copy link
Member Author

fredvd commented May 12, 2017

@rodfersou @hvelarde Yes, this solves the issue, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants