Opened 9 years ago
Closed 9 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 9 years ago by
Owner: | set to javadoug |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Status: | pending → new |
---|
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 9 years ago by
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.
comment:4 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
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.
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.