mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Make clicking edit tag button easier
Currently, tags will be dragged immediately on touch, which makes it very hard to click the edit button, as any non-perfect touch drags the tag. This commit adds a delay on mobile devices only, so that the tag can be both dragged and edited easily. Closes https://github.com/flarum/core/issues/3098
This commit is contained in:
@@ -150,6 +150,9 @@ export default class TagsPage extends ExtensionPage {
|
|||||||
this.$('.TagList').get().map(e => {
|
this.$('.TagList').get().map(e => {
|
||||||
sortable.create(e, {
|
sortable.create(e, {
|
||||||
group: 'tags',
|
group: 'tags',
|
||||||
|
delay: 50,
|
||||||
|
delayOnTouchOnly: true,
|
||||||
|
touchStartThreshold: 5,
|
||||||
animation: 150,
|
animation: 150,
|
||||||
swapThreshold: 0.65,
|
swapThreshold: 0.65,
|
||||||
dragClass: 'sortable-dragging',
|
dragClass: 'sortable-dragging',
|
||||||
|
Reference in New Issue
Block a user