Search and Top Navigation
#8133 open bug ()
Opened February 23, 2012 07:13AM UTC
Last modified March 11, 2013 03:31AM UTC
Sortable: placeholder option class gets replaced with an object
Reported by: | jbruni | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.sortable | Version: | 1.8.16 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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.
Attachments (0)
Change History (5)
Changed February 23, 2012 07:14AM UTC by comment:1
Changed June 14, 2012 05:13PM UTC by comment:2
version: | git → 1.8.16 |
---|
Changed October 11, 2012 02:55PM UTC by comment:3
milestone: | 1.9.0 → 2.0.0 |
---|
Changed November 04, 2012 09:56PM UTC by comment:4
description: | 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 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. → 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. |
---|---|
status: | new → open |
summary: | Cannot retrieve placeholder option value → Sortable: placeholder option class gets replaced with an object |
Note: I had to "mutilate" the description until I could pass Akismet rejection.