Fixed Post-edit triggered twice

Lukas W.

Well-known member
Affected version
2.0.0
I'm not really sure how I triggered this as I don't recall doing anything special, so this may either be lag-related or one of these "one-of-a-kind" mysterious errors that sometimes happen, but I apparently managed to trigger the post edit twice when clicking on the edit link in the thread view.

2YIW7KF.png


Quite fascinating that it is still perfectly aligned. Looks like the designer took care of this edge case! :p
Either way, probably isn't such a huge issue, I really can't reproduce it, just reporting it for the cause - maybe you can find something super obvious in the script that controls this.
 
I think I know what causes this. We have a common pattern of blocking repeat AJAX requests. This particular case should ideally wait until the sliding animation has finished before cancelling that. We give it 300ms to do that. 99% of the time that's enough. In certain circumstances, it's not enough so the edit link becomes active again too soon.

An arbitrary timeout isn't going to be sufficient, so I've changed this to cancel the AJAX blocking after the animation has completed.
 
Back
Top Bottom