Changing text in a TargetWidget does not enable dialog's "Apply" button (in media, gallery, reference dialog) until second keypress.
Description
Details
Related Objects
Event Timeline
Change 473852 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[VisualEditor/VisualEditor@master] Revert "TargetWidget: 'change' on document transact, not surface history"
The change I'm reverting was meant to improve this in the gallery dialog (see comments on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/471272, search for "I36e76307d"), but it breaks other dialogs. It is no longer needed for the gallery after my proposed changes in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/473840.
Oooh, thanks. Do we think the behaviour happens because of setTimeout subtlety? (That would instinctively be my first guess but I haven't checked).
Change 473852 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Revert "TargetWidget: 'change' on document transact, not surface history"
Change 474757 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (812b2140a)
Change 474757 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (812b2140a)
I still think that was conceptually a good change. The 'history' event is "Emitted when the history stacks change, or the ability to use them changes." - that is not the same as the surface changing, as it is also emitted on surface disable/enable.
We should come up with a version of that commit that works correctly.