Change record status: 
Project: 
Introduced in branch: 
7.x
Introduced in version: 
7.6
Description: 

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

Binding to 'mousedown' rather than 'click' means that it is possible to trigger a click by:

  1. Pressing the mouse button
  2. Holding the mouse button down until the Ajax request is complete and the button is re-enabled.
  3. Then releasing the mouse button.

Setting the 'prevent' property makes ajax.js bind an additional handler to prevent such a click from triggering a non-Ajax form submission. This also prevents a textfield's <Enter> keypress from triggering this button's non-Ajax form submission behavior.

See:

#ajax on Forms API reference

Ajax Framework

Impacts: 
Module developers
Themers
Updates Done (doc team, etc.)
Online documentation: 
Generic online documentation done
Theming guide: 
Not done
Module developer documentation: 
Module developer documentation done
Examples project: 
Examples for developers done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done