Search and Top Navigation
#4579 closed bug (notabug)
Opened June 04, 2009 04:41PM UTC
Closed April 17, 2017 07:57PM UTC
Sortable: Connected sortables with helpers overrides style sheet display values
Reported by: | GimpArm | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.sortable | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When dragging an item from one sortable to another using a helper the display property retains its original value even though the display is set by the style class hierarchy.
I would expect this to be a problem with anything that does "jQuery.hide() -> move element -> jQuery.show()" as hide() and show() store the old display property then store it, although I don't know why it stores the display value that comes from a style class. Maybe this should be fixed in the jQuery core.
I set up a demo at:
http://meson.erdc.k12.mn.us/sortable
When no helper is specified the behavior is as expected.
Attachments (0)
Change History (6)
Changed June 09, 2009 08:11AM UTC by comment:1
milestone: | TBD → 1.8 |
---|
Changed January 31, 2012 04:35AM UTC by comment:2
it seems not only display values of style. width, height value is aslo changed by sortable plugin internally to fit the original element.
Changed October 11, 2012 02:54PM UTC by comment:3
milestone: | 1.9.0 → 2.0.0 |
---|
Changed October 25, 2012 01:22AM UTC by comment:4
status: | new → open |
---|---|
summary: | Connected sortables with helpers overrides style sheet display values → Sortable: Connected sortables with helpers overrides style sheet display values |
Changed March 04, 2013 04:15AM UTC by comment:5
The height and width styles are handled by #4345.
Sortable does preserve the
displayproperty originally declared in CSS. What it does not do is handle two lists that have different
displayproperty values. But if you have connected lists you're almost going to want them to have the same display property value. Can anybody think of any use cases of different displays (block / inline-block / inline)?
I'm leaning towards the being something that we don't support. This would be tricky to implement, I can't think of any real use cases where this would be useful, and it's easy to workaround. If you really need it !important can be used (http://jsfiddle.net/tj_vantoll/Caw5Q/) or you can restore the style manually in a stop event.
Changed April 17, 2017 07:57PM UTC by comment:6
resolution: | → notabug |
---|---|
status: | open → closed |
This is a jQuery Core bug, not a jQuery UI bug. As of jQuery 3.0.0, this works as expected.