From 588ab6270e16d510d54e0418243910e32a7cc59b Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Sat, 7 Mar 2015 11:55:33 -0500 Subject: [PATCH] Fix bug where a blank name could be set for a window --- popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popup.js b/popup.js index fb70570..d90360f 100644 --- a/popup.js +++ b/popup.js @@ -125,7 +125,7 @@ function setupWindowElement(currentWindow,callback){ input.setAttribute('value',windowName.textContent); input.addEventListener('keydown', function(event){ event.stopPropagation(); - if(event.keyCode===13){ + if(event.keyCode===13 && input.value.length>0){ event.preventDefault(); windowName.textContent = input.value; input.parentNode.replaceChild(windowName,input);