Opened 6 years ago

Closed 6 years ago

#9580 closed feature (notabug)

resizable.resize event should support stopping propagation

Reported by: javadoug Owned by: javadoug
Priority: minor Milestone: none
Component: ui.resizable Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

If the resize event is going to bubble to window then we should be able to stop it using the normal propagation mechanism. Having to hack a solution to get normal application behavior is not acceptable. Pls consider improving resizable to allow standard event behavior.

Expected behavior, calling stopPropagation method on the resize event of a resizable element should stop propagation of the event and prevent window.resize event from firing.

Current behavior, calling stopPropagation has no effect on the resizable.resize event.

Change History (4)

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

Owner: set to javadoug
Status: newpending

It's just standard jQuery event, so event.stopPropagation() should work just fine. Note that if you're using the callback, and not an event handler, that it's too late to stop propagation. Please either provide a reduced test case showing that this is a broken, or confirm that you weren't actually using an event handler.

comment:2 Changed 6 years ago by javadoug

Status: pendingnew

I am specifically referring to the callback, which is how most of the other callbacks in jquery work. It seems that the response from the callback should be trapped and respected before triggering the resize event. When I use other event callbacks in jquery libs they usually respect the event object's propagation state.

comment:3 Changed 6 years ago by javadoug

Perhaps, some confusion could be reduced by renaming the callback. If the callback is not the event then rename it to make it distinct from the resize event.

Last edited 6 years ago by javadoug (previous) (diff)

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

Resolution: notabug
Status: newclosed

It is very much not distinct from the event. You can think of it as the last point of propagation, but it will be called even if propagation is stopped.

Note: See TracTickets for help on using tickets.