Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The openDialog ajax command moves dialog buttons to buttons area and binds a click event to them. When clicked, the dialog simulates mouse events on the original dialog buttons. The order of events is mousedown, click, mouseup:
'click': function (e) {
$originalButton.trigger('mousedown').trigger('click').trigger('mouseup');
e.preventDefault();
}
At least on my machine, clicking a form submit button fires these events in the following order: mousedown, mouseup, click.
Proposed resolution
Change the order of events to mousedown, mouseup, click.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
dialog-ajax-click.patch | 598 bytes | olli | |
Comments
Comment #1
nod_Mouseup is used in tabledrag and views. Both time it's the only event of the three (listed) so reordering them isn't a problem. Both tabledrag and views still work as expected.
Comment #2
alexpottFrom http://unixpapa.com/js/mouse.html.
This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 8fa3288 and pushed to 8.0.x. Thanks!