Reputation: 372
I need to drag and drop items from one list to another, which is working fine, but in fire fox browser i cant type in textarea while in other browser I can type in text area
$(function () {
$("#contentLeft ol, #contentright ol").sortable({
connectWith: ".connectedSortable"
}).disableSelection();
});
Thanks in advance
Upvotes: 1
Views: 1024
Reputation: 388316
The root cause of the problem is FF does not support the selectstart event - so it prevents the default action of mousedown
event which disables the focus on the textarea using click event.
Demo: Fiddle
Upvotes: 1
Reputation: 100175
Thats because you are calling .disableSelection()
for the container which includes textarea
as well, try doing:
$(function () {
.sortable({
connectWith: ".connectedSortable"
});
$("#contentLeft ol, #contentright ol").not("textarea").disableSelection();
});
Upvotes: 1
Reputation: 6795
Looks like that for some reason, .disableSelection()
is actually disabling the selection of the textarea
in Firefox, but not in other browsers. You could opt to remove it, as it is not completely necessary for your code to work.
$(function () {
$("#contentLeft ol, #contentright ol").sortable({
connectWith: ".connectedSortable"
});
});
Upvotes: 1