Page MenuHomePhabricator

MenuTagMultiselectWidget: `draggable: false` doesn't do anything
Closed, DeclinedPublic

Description

Steps to reproduce:

  1. Go to https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.MenuTagMultiselectWidget
  2. Edit the example to include draggable: false in the config for the MenuTagMultiselectWidget constructor
  3. Go to the preview.
  4. Drag an item.

Expected:
The item should not be draggable.

Actual:
It is.

Event Timeline

Volker_E renamed this task from draggable: false doesn't do anything for MenuTagMultiselectWidget to MenuTagMultiselectWidget: `draggable: false` doesn't do anything.Jun 13 2018, 2:44 PM
Vvjjkkii renamed this task from MenuTagMultiselectWidget: `draggable: false` doesn't do anything to 50caaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from 50caaaaaaa to MenuTagMultiselectWidget: `draggable: false` doesn't do anything.Jul 2 2018, 3:39 PM
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
matmarex subscribed.

I think this is the expected behavior – draggable: false only applies to the MenuTagMultiselectWidget, and not the the internal TagItemWidgets, so they're still draggable (but dragging them doesn't do anything, because the parent multiselect widget is not draggable, and doesn't allow dropping them).

I think what you actually want is allowReordering: false. Which currently also doesn't do anything, but that's a bug, and I'm fixing it in https://gerrit.wikimedia.org/r/c/oojs/ui/+/1109174. (Or you can override addTag() and make each tag item non-draggable there.)