Fixed Overlay beforeShow/afterShow do not set cancellable flag by default

Xon

Well-known member
Affected version
2.3.0
Code:
const e = new Event('overlay:before-show')

options.beforeShow(overlay, e)
if (e.defaultPrevented)
{
    return
}

If a _beforeShow implementation calls e.preventDefault(); this will silently fail. Setting e.cancelable = true; before the call will then work but is very much an unexpected break.

This applies to _afterShow as well.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.1).

Change log:
Use XF custom events for overlay and transition events
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom