#9028 closed bug (notabug)
When cancelHelperRemoval is true, the placeholder is not removed
Reported by: | linus.yan87 | Owned by: | linus.yan87 |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.sortable | Version: | 1.9.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When cancelHelperRemoval is true, _clear() just return without removing the placeholder. Why not put placeholder removal statement forward before cancelHelperRemoval condition? I don't think helper is related with placeholder.
Change History (16)
comment:1 Changed 10 years ago by
Owner: | set to linus.yan87 |
---|---|
Status: | new → pending |
comment:2 follow-ups: 4 5 Changed 10 years ago by
Sorry, should have given you a link to the sortable test case - http://jsfiddle.net/tj_vantoll/wjxe4/.
comment:3 follow-up: 6 Changed 10 years ago by
Status: | pending → new |
---|
comment:4 follow-up: 7 Changed 10 years ago by
Replying to tj.vantoll:
Sorry, should have given you a link to the sortable test case - http://jsfiddle.net/tj_vantoll/wjxe4/.
Hi tj.vantoll,
I try to clarify the problem in jsfiddle: http://jsfiddle.net/tj_vantoll/wjxe4/. But I suddenly met a strange problem. I can't get the sortable object. $('#sortable').data('sortable') return undefined. Do you know why?
comment:5 Changed 10 years ago by
Replying to tj.vantoll:
Sorry, should have given you a link to the sortable test case - http://jsfiddle.net/tj_vantoll/wjxe4/.
In fact, I used a additional div as the helper element. But I don't need to remove it when sorting has stopped. So I set the cancelHelperRemoval property to true before sorting stopped. Then, the helper is not removed(this is what I need), but the placeholder is not removed(not I need), too. And it will create a new one every time you drag the items.
comment:6 Changed 10 years ago by
Replying to linus.yan87:
I'm not sure what happened in jsFiddle. But we can't get the sortable object with $('#sortable').data('sortable'). My chosen framework is jQuery 1.9.0 and jQuery ui 1.9.2.
comment:7 follow-up: 8 Changed 10 years ago by
Status: | new → pending |
---|
I try to clarify the problem in jsfiddle: http://jsfiddle.net/tj_vantoll/wjxe4/. But I suddenly met a strange problem. I can't get the sortable object. $('#sortable').data('sortable') return undefined. Do you know why?
You can use $("#sortable").data("uiSortable")
. And we still need a test case that shows the issue you're describing to look into this. Thanks.
comment:8 Changed 10 years ago by
Status: | pending → new |
---|
Replying to tj.vantoll:
I try to clarify the problem in jsfiddle: http://jsfiddle.net/tj_vantoll/wjxe4/. But I suddenly met a strange problem. I can't get the sortable object. $('#sortable').data('sortable') return undefined. Do you know why?
You can use
$("#sortable").data("uiSortable")
. And we still need a test case that shows the issue you're describing to look into this. Thanks.
Thanks, I have created the test case for you: http://jsfiddle.net/linus/LM4jC/. Try to drag the items, you'll see the not-removed placeholders.
By the way, why is "uiSortable" not "sortable"? It seems you made a big change from 1.8.2 to 1.9.0 on widget object getter.
comment:9 Changed 10 years ago by
By the way, why is "uiSortable" not "sortable"? It seems you made a big change from 1.8.2 to 1.9.0 on widget object getter.
1.9 upgrade guide - deprecation notice, 1.10 upgrade guide - removal notice
comment:10 follow-up: 11 Changed 10 years ago by
Status: | new → pending |
---|
What are you actually doing that's causing this? That's an internal property that you shouldn't be setting yourself.
comment:11 Changed 10 years ago by
Status: | pending → new |
---|
Replying to scott.gonzalez:
What are you actually doing that's causing this? That's an internal property that you shouldn't be setting yourself.
I'm not sure if you know there is a browser bug about iframe. When iframe is in a draggable item, and it's dropped, the iframe will be refreshed. This is a headache to create pages like dashboard. Do you know JIRA dashboard? They use the absolute layout, and the dashboard item is used as the helper.
comment:12 follow-up: 13 Changed 10 years ago by
Status: | new → pending |
---|
I have no idea how that's related to this ticket. What doe using draggable on an iframe have to do with setting an internal property on sortable? Please either describe a bug that occurs with the public APIs or describe the feature that you need.
comment:13 Changed 10 years ago by
Status: | pending → new |
---|
Replying to scott.gonzalez:
I have no idea how that's related to this ticket. What doe using draggable on an iframe have to do with setting an internal property on sortable? Please either describe a bug that occurs with the public APIs or describe the feature that you need.
It's a public property, I thought it was a public API. Then, I hope you can provide this feature that not to remove the helper when cancelHelperRemoval is set to true.
comment:14 follow-up: 15 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
By that logic, EVERYTHING is public, because we use prototypes and store everything on the instances.
comment:15 Changed 10 years ago by
Replying to scott.gonzalez:
By that logic, EVERYTHING is public, because we use prototypes and store everything on the instances.
That's very strange, cancelHelperRemoval is never set in any function, but you have this property to do condition statement. If you never try to set this as a public property, then, could you tell me where you have set this property internally?
Hi linus.yan87, thanks for taking the time to contribute to the jQuery UI project.
Is this creating any issues for you? If so we'll need a reduced test case that shows it, you can use this to get started http://jsfiddle.net/tj_vantoll/kY7FA/.