Search and Top Navigation
#3621 closed bug (notabug)
Opened November 24, 2008 10:48PM UTC
Closed January 09, 2009 03:31PM UTC
placeholder option problem with sortable elements
Reported by: | chag | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.7 |
Component: | ui.sortable | Version: | 1.6rc2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The 'placeholder' option doesn't work as it should with sortable object. the placeholder styles do not overwrite the element style.
ex :
$(document).ready(function(){ $(".news_elements").sortable({ placeholder: "news_elements_empty", revert: true }); });
css :
.news_elements li { background-color: blue; } .news_elements_empty { background-color: red; }
html :
<ul class="news_elements"> <li>test1</li> <li>test2</li> <li>test3</li> </ul>
When dragging the li, the empty place to drop it is not red. It's blue. But, if you don't defin a background on the LI, then, you'll see the blue one.
You can also try this with the actual last sortable demo on this page :
http://dev.jquery.com/view/tags/ui/latest/demos/functional/#ui.sortable
Attachments (1)
Change History (3)
Changed November 30, 2008 01:41PM UTC by comment:1
component: | ui.core → ui.sortable |
---|---|
milestone: | TBD → 1.6 |
Changed January 07, 2009 05:54PM UTC by comment:2
I looked this issue and saw in firebug that the class .news_elements li overrides the news_elements_empty, so every li inside that ul is going to be blue it doesn't matter which class you put in the li element. I'm attaching a screenshot of firebug.
Changed January 09, 2009 03:31PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | new → closed |
This is not a bug in jQuery UI - it's simply because your CSS for the placeholder is not specific enough, and therefore doesn't overwrite the default style. If you change the rule for the red background to ".news_elements .news_elements_empty", it'll work fine.