New #ajax['prevent'] property added in 7.5

Last updated on
15 October 2016


A new #ajax['prevent'] setting was added, defaulting to 'click'

Binding to mousedown rather than click means that it is possible to trigger a
click by pressing the mouse, holding the mouse button down until the Ajax
request is complete and the button is re-enabled, and then releasing the mouse
button. Set 'prevent' so that ajax.js binds an additional handler to prevent
such a click from triggering a non-Ajax form submission. This also prevents a
textfield's ENTER press triggering this button's non-Ajax form submission