Merge pull request #4546 from huffman/edit-tab-select

Fix edit.js not selecting all when tabbing between properties
This commit is contained in:
Brad Hefta-Gaub 2015-03-31 12:50:39 -07:00
commit 672d95cac6

View file

@ -210,6 +210,9 @@
disableChildren(document.getElementById("properties-list"), 'input');
} else {
var activeElement = document.activeElement;
var selected = activeElement.selectionStart == 0 && activeElement.selectionEnd == activeElement.value.length;
var properties = data.selections[0].properties;
elID.innerHTML = properties.id;
@ -335,6 +338,11 @@
elLightExponent.value = properties.exponent;
elLightCutoff.value = properties.cutoff;
}
if (selected) {
activeElement.focus();
activeElement.select();
}
}
}
});