Ticket #8133 (open bug)
Sortable: placeholder option class gets replaced with an object
|Reported by:||jbruni||Owned by:|
Description (last modified by petersendidit)
If I pass a class name as the placeholder config option when creating a sortable, I can retrieve it using sortable('option', 'placeholder') only before the placeholder is created the first time (before _createPlaceholder is called). After it, instead of returning the class name as it should, it returns an object.
See in action at http://jsfiddle.net/hyBfm/
It was easy to track the cause in the source code (jquery.ui.sortable.js)
At line 657, the option goes to a variable called "className". In the next line, 658, the option is overwritten by an object which serves internal purposes.
For us, end users, the behaviour of having inconsistent return values for the sortable('option', 'placeholder') is unwanted and it is not what the documentation says.
comment:2 Changed 3 years ago by scott.gonzalez
- Version changed from git to 1.8.16
comment:3 Changed 3 years ago by scott.gonzalez
- Milestone changed from 1.9.0 to 2.0.0
comment:4 Changed 3 years ago by petersendidit
- Description modified (diff)
- Status changed from new to open
- Summary changed from Cannot retrieve placeholder option value to Sortable: placeholder option class gets replaced with an object