From 5a9ee734764e467c424806a30fe5f7330cf4d148 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 9 Apr 2015 20:10:00 -0700 Subject: [PATCH] Fix error in entity properties not showing selections --- examples/html/entityProperties.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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;