Ticket #8757 (closed bug: fixed)

Opened 2 years ago

Last modified 23 months ago

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:
Blocking: Blocked by:

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

comment:1 follow-up: ↓ 5 Changed 2 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to notabug

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 2 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 2 years ago by MatteS75 (previous) (diff)

comment:3 Changed 2 years ago by scott.gonzalez

  • Status changed from closed to reopened
  • Resolution notabug deleted

Reopening based on pending PR.

comment:4 Changed 2 years ago by scott.gonzalez

  • Status changed from reopened to open
  • Component changed from ui.resizable to ui.draggable

comment:5 in reply to: ↑ 1 Changed 2 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 2 years ago by scott.gonzalez

  • 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 23 months ago by mikesherov

  • Summary changed from Resizable handle with inner element does not work, when its also draggable to Draggable: Resizable handle with inner element does not work, when its also draggable

comment:8 Changed 23 months ago by mathias.stenbom

  • Status changed from open to closed
  • Resolution set to fixed

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.