Ticket #4429 (reopened bug)

Opened 17 months ago

Last modified 3 months ago

Can't select text in inputs within sortables

Reported by: mikejestes Owned by:
Priority: minor Milestone: TBD
Component: ui.sortable Version: 1.7.1
Keywords: Cc:

Description

Text inside a text input element cannot be selected when in a sortable area.

I have a demo here:  http://mikejestes.com/demo/?demo=jquery_ui_sortable

Change History

Changed 17 months ago by garethky

Somewhere in the sample code you linked to there is a call to dissableSelection();

This is actually a method in ui.core that stops the user from using the cursor to select text. Its in the sortable examples as well:

$(function() {

$("#sortable").sortable(); $("#sortable").disableSelection(); // this will disable text selection!

});

Suggest using a more specific selector so that input boxes are not caught up in this.

Changed 16 months ago by joern.zaefferer

  • status changed from new to closed
  • resolution set to invalid

See comment by garethky.

Changed 16 months ago by joern.zaefferer

  • status changed from closed to reopened
  • resolution invalid deleted

Related ticket: #4541

Changed 11 months ago by kae

had the same problem myself today. the solution (from the client-programming side) is to apply sortable to the event, then override the sortable's mouse events.

For example:

  $('#form_fields').sortable();
  $('#form_fields input').bind('click.sortable mousedown.sortable',function(ev){
    ev.target.focus();
  });

Changed 3 months ago by djo69

Hey,

I have a similar pb. In my fieldset sortable i want to unsortable an element ul insered on the fieldset .

Exemple :

<fieldset id='base'> <ul id='panel'> <li></li> .. <ul> </fieldset>

i want that when i click on my ul-panel the sortable mode was not activated, but just arond the ul.

I test : $('#form_fields').sortable();

$('#form_fields ul').bind('click.sortable mousedown.sortable',function(ev){

ev.target.focus();

});

but it's change anything.

Thanks in advance

Note: See TracTickets for help on using tickets.