misc: enable live prefill updates for dynamic user selection (#51686)

This commit is contained in:
Frédéric Péters 2021-03-05 09:24:56 +01:00
parent 082949423f
commit 6565a67a91
1 changed files with 4 additions and 2 deletions

View File

@ -283,7 +283,8 @@ $(function() {
return true;
});
var live_evaluation = null;
$('form div[data-live-source]').parents('form').on('wcs:change', function(ev, data) {
if ($('div[data-live-source]').length || $('.submit-user-selection').length) {
$('form[data-live-url]').on('wcs:change', function(ev, data) {
if (live_evaluation) {
live_evaluation.abort();
}
@ -370,7 +371,8 @@ $(function() {
});
}
});
});
});
}
if ($('div[data-live-source]').length) {
$('form').on('change input paste wcs:change',
'div[data-live-source] input, div[data-live-source] select, div[data-live-source] textarea',