Draggable Dialog : dragging handle

Draggable Dialog : dragging handle

Hi,

I was looking for a way to allow dragging by elements inside the dialog content, because i didn't want to use the dialog title bar.
I first tried to add elements with ui-dialog-titlebar class (and skin them so that it doesn't look like a tittlebar) but it didn't work. I looked to the ui-dialog js code and actually the 'cancel' option has 'ui-dialog-content' class (meaning nothing in the dialog content can be a draggable handle).

The solution i chose to this is to set the draggable options of the popup with its 'option' method, after having created the jquery ui dialog.
  1. var dialog = jQuery('.selector').dialog({ /* opts */ });
  2. dialog.dialog('widget').draggable('option', { 'handle': /* handle selector */, 'cancel': /* cancel selector */ });
I just worry about why jQuery UI developers did put the dialog content in the cancel selector ; maybe there's a good reason for this.