Opened 10 years ago

Closed 10 years ago

#8757 closed bug (fixed)

Draggable: Resizable handle with inner element does not work, when its also draggable

Reported by: MatteS75 Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.draggable Version: 1.9.1
Keywords: haspatch Cc:
Blocked by: Blocking:

Description

Creating a handle with an inner element renders the resize handle useless.

  1. Create a resizable div with an inner div with the handle classes setup
  2. Add another div inside the handle div
  3. Initialize the draggable
  4. Initialize the resizable

Now the resizable handle does not work. Removing the inner div, and it does work.

This might seems to be the same as http://bugs.jqueryui.com/ticket/8756, but it might not be. Fixing that bug might make this scenario fail still. Applying the workaround for this, and it still does not work: http://jsfiddle.net/MatteS75/A7N6L/

Change History (8)

comment:1 Changed 10 years ago by Scott González

Resolution: notabug
Status: newclosed

I'm going to close this as not a bug since this isn't something we support. If this is still broken when (if) the other ticket is resolved, then feel free to file a new ticket.

comment:2 Changed 10 years ago by MatteS75

If its helping someone else, this is the code change that fixes it:

@@ -5909,7 +5909,7 @@
 		var o = this.options;
 
 		// among others, prevent a drag on a resizable-handle
-		if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
+		if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle') || $(event.target).closest('.ui-resizable-handle').length > 0)
 			return false;


Last edited 10 years ago by MatteS75 (previous) (diff)

comment:3 Changed 10 years ago by Scott González

Resolution: notabug
Status: closedreopened

Reopening based on pending PR.

comment:4 Changed 10 years ago by Scott González

Component: ui.resizableui.draggable
Status: reopenedopen

comment:5 in reply to:  1 Changed 10 years ago by mikesherov

Replying to scott.gonzalez:

I'm going to close this as not a bug since this isn't something we support. If this is still broken when (if) the other ticket is resolved, then feel free to file a new ticket.

Why was this reopened? Not sure what the "pending" PR is?

comment:6 Changed 10 years ago by Scott González

Keywords: haspatch added

I'm waiting on a new PR based on https://github.com/jquery/jquery-ui/pull/807#issuecomment-10081536

If that doesn't come soon, we can just update his commit and land it.

comment:7 Changed 10 years ago by mikesherov

Summary: Resizable handle with inner element does not work, when its also draggableDraggable: Resizable handle with inner element does not work, when its also draggable

comment:8 Changed 10 years ago by mathias.stenbom

Resolution: fixed
Status: openclosed

Draggable: made handles work with complex markup. Fixes #8757 - Draggable: Resizable handle with inner element does not work, when its also draggable

Changeset: cf9fbce13931732dc4b06d491ef2a01c4921faf1

Note: See TracTickets for help on using tickets.