• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed .Disabler does not re-disable in a .formOverlay when a reset button is clicked

Chris D

XenForo developer
Staff member
#1
I'm not entirely sure this can be replicated with any out of the box functionality, but consider a form overlay that contains these controls:

upload_2014-7-24_15-20-31.png

If I check the checkbox and enter a value in the textbox and then I click "Cancel", which is a reset button, the checkbox becomes unchecked, and the value of the textbox becomes empty.

Yet, when I reactivate the overlay:

upload_2014-7-24_15-24-10.png

The .Disabler checkbox is unchecked, so you would expect that the textbox would have the disabled attribute and the disabled class, but it doesn't. It's only really a subtle difference and clicking into the non-disabled checkbox does indeed automatically check the checkbox again, but overall I would be expecting different behaviour, e.g. if the form fields are reset, then the .Disabler should kick back in too.
 

Mike

XenForo developer
Staff member
#2
Appears that when the reset event is called, the value may not have actually changed yet which means our recalculate uses the old value. Using a setTimeout call sorts it.

It is possible to do this in the core in 1.3 by using the move thread overlay and changing the redirect option.