diff --git a/examples/html/entityProperties.html b/examples/html/entityProperties.html index 596bf5c9d5..1c5fd58084 100644 --- a/examples/html/entityProperties.html +++ b/examples/html/entityProperties.html @@ -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(); + } } } });