I have a list of divs that I want to be able to sort. Each div has text in it, and also a handle inside of it (due to the UI, I only want to sort if the left half of the list item is dragged). In Chrome/FireFox this works great, but in IE if you click on the text it won't let you sort, even though the text is within the handle.
I have a stripped down mockup of the problem here, make sure you use Internet Explorer to test: http://jsfiddle.net/t8Ebd/
I'm assuming this is a layering thing, but have tried the following approaches with no luck:
Anyone have any other ideas??
You've got an extra comma after ".sorthandle" that breaks in IE:
$("ul").sortable({
handle: ".sorthandle", // here
});
Change it to:
$("ul").sortable({
handle: ".sorthandle"
});
I have suggested in the comment to use the method disableSelection()
from jQuery UI. Although it does not seem to quite work neither.
I have managed to achieve what you're after by setting a background-color to the handle and the opacity to zero so it's invisible:
.sorthandle {
...
background-color: White;
opacity: 0;
filter: alpha(opacity = 0);
}
DEMO
Of course this removes your green border, I don't know if this is important or not.
Maybe this would work by using a png transparent background-image. My guess is that the handle having no background, IE selects the text underneath.
change your layout to: (kind of a hack)
<div class='sorthandle'><span> </span></div>
and add this css:
.sorthandle span{
width:100%;
background-color:blue;
opacity:0.0;
filter:alpha(opacity=0);
display:block;
}
USE THIS IF you want to keep the border on the sorthandle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With