diff --git a/examples/html/entityProperties.html b/examples/html/entityProperties.html
index d0be4144c9..bfb84c68a5 100644
--- a/examples/html/entityProperties.html
+++ b/examples/html/entityProperties.html
@@ -211,7 +211,14 @@
disableChildren(document.getElementById("properties-list"), 'input');
} else {
var activeElement = document.activeElement;
- var selected = activeElement.selectionStart == 0 && activeElement.selectionEnd == activeElement.value.length;
+
+ try {
+ var selected = (activeElement
+ && activeElement.selectionStart == 0
+ && activeElement.selectionEnd == activeElement.value.length);
+ } catch (e) {
+ var selected = false;
+ }
var properties = data.selections[0].properties;