Opened 14 years ago
Closed 6 years ago
#4579 closed bug (notabug)
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.
Change History (6)
comment:1 Changed 14 years ago by
Milestone: | TBD → 1.8 |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:4 Changed 10 years ago by
Status: | new → open |
---|---|
Summary: | Connected sortables with helpers overrides style sheet display values → Sortable: Connected sortables with helpers overrides style sheet display values |
comment:5 Changed 10 years ago by
The height and width styles are handled by #4345.
Sortable does preserve the display
property originally declared in CSS. What it does not do is handle two lists that have different display
property 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.
comment:6 Changed 6 years ago by
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.
it seems not only display values of style. width, height value is aslo changed by sortable plugin internally to fit the original element.