Search and Top Navigation
#3909 closed bug (wontfix)
Opened January 22, 2009 04:21PM UTC
Closed January 23, 2009 02:22PM UTC
Last modified October 11, 2012 09:15PM UTC
Sortables placeholders don't hold their original height anymore (regression from 1.6RC4)
Reported by: | beat | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.core | Version: | 1.6rc5 |
Keywords: | Cc: | beat@joomlapolis.com | |
Blocked by: | Blocking: |
Description
Following worked fine in 1.6RC4 and before, but doesn't work in 1.6RC5 anymore:
This CSS worked fine in 1.6 RC4, displaying fine the placeholder when moving the sortable:
CSS:
ul#fieldValuesList { list-style-type: none; border: 1px solid #999; margin: 5px; padding: 5px; width:90%; }
ul#fieldValuesList li { list-style-image: url(images/mini-icons/icon-18-sort_up_down.png); margin-left: 20px; margin-bottom: 4px; cursor: move; }
ul#fieldValuesList li input { cursor: text; }
.fieldValuesList-selected { background-color: #E6F7D4; }
JS:
$('#fieldValuesList').sortable( { items: 'li', containment: 'parent', animated: true, placeholder: 'fieldValuesList-selected' } );
But doesn't work anymore in 1.6RC5 (and SVN): the <li> collapses making move unnatural.
This is a problem with items of variable height. I had to workaround this bug by fixing the height, which is a problem, as follows:
CSS from above that had to be changed:
ul#fieldValuesList li { height: 2em; line-height: 1.0em; background-image:url(images/mini-icons/icon-18-sort_up_down.png); background-position:right center; background-repeat:no-repeat; margin-left: 20px; margin-bottom: 4px; cursor: move; }
fieldValuesList-selected { height: 2em; line-height: 1.0em; background-color: #E6F7D4; }
This makes sortable unusable for variable heights, so it's major. It's a separate bug from #3908 but both together made my sortable not work at all anymore.
(moreover I have <input type="text">'s inside the <li>, so as those are clickable-not-draggable, made problem worse).
We changed the bahviour for placeholders a bit to make it simpler to work with them. Use the option forcePlaceholderSize in your case to give the placeholder a forced size.