Avoid missing characters in poll's inputs
This commit is contained in:
@@ -464,11 +464,13 @@ define([
|
|||||||
Render.updateTable(table, displayedObj, conf);
|
Render.updateTable(table, displayedObj, conf);
|
||||||
// Fix autocomplete bug:
|
// Fix autocomplete bug:
|
||||||
displayedObj.content.rowsOrder.forEach(function (rowId) {
|
displayedObj.content.rowsOrder.forEach(function (rowId) {
|
||||||
|
if (f.id === rowId) { return; }
|
||||||
$('input[data-rt-id="' + rowId +'"]').val(displayedObj.content.rows[rowId] || '');
|
$('input[data-rt-id="' + rowId +'"]').val(displayedObj.content.rows[rowId] || '');
|
||||||
});
|
});
|
||||||
displayedObj.content.colsOrder.forEach(function (rowId) {
|
displayedObj.content.colsOrder.forEach(function (colId) {
|
||||||
$('input[data-rt-id="' + rowId +'"]')
|
if (f.id === colId) { return; }
|
||||||
.val(displayedObj.content.cols[rowId] || '');
|
$('input[data-rt-id="' + colId +'"]')
|
||||||
|
.val(displayedObj.content.cols[colId] || '');
|
||||||
});
|
});
|
||||||
updateDisplayedTable();
|
updateDisplayedTable();
|
||||||
setFocus(f);
|
setFocus(f);
|
||||||
@@ -512,7 +514,7 @@ define([
|
|||||||
case 'text':
|
case 'text':
|
||||||
debug("text[rt-id='%s'] [%s]", id, input.value);
|
debug("text[rt-id='%s'] [%s]", id, input.value);
|
||||||
Render.setValue(object, id, input.value);
|
Render.setValue(object, id, input.value);
|
||||||
change(null, null, null, 250);
|
change(null, null, null, 1000);
|
||||||
break;
|
break;
|
||||||
case 'number':
|
case 'number':
|
||||||
debug("checkbox[tr-id='%s'] %s", id, input.value);
|
debug("checkbox[tr-id='%s'] %s", id, input.value);
|
||||||
@@ -630,6 +632,7 @@ define([
|
|||||||
|
|
||||||
switch (nodeName) {
|
switch (nodeName) {
|
||||||
case 'INPUT':
|
case 'INPUT':
|
||||||
|
if ($(target).is('[type="text"]') && !isKeyup) { return; }
|
||||||
if (isKeyup && (e.keyCode === 13 || e.keyCode === 27)) {
|
if (isKeyup && (e.keyCode === 13 || e.keyCode === 27)) {
|
||||||
var id = target.getAttribute('data-rt-id');
|
var id = target.getAttribute('data-rt-id');
|
||||||
if ($(target).parents('.cp-app-poll-table-uncommitted').length
|
if ($(target).parents('.cp-app-poll-table-uncommitted').length
|
||||||
|
|||||||
Reference in New Issue
Block a user