From b7fb1f14e1c0f93e6b5acb49e6dceb6ec10c861d Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 11 Mar 2015 23:04:20 +0300 Subject: [PATCH] Edit style: warn on losing changes to applies-to fields --- edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit.js b/edit.js index c06e27f9..6b526039 100644 --- a/edit.js +++ b/edit.js @@ -154,7 +154,7 @@ function addAppliesTo(list, name, value) { e.querySelector("[name=applies-type]").value = name; e.querySelector("[name=applies-value]").value = value; e.querySelector(".remove-applies-to").addEventListener("click", removeAppliesTo, false); - e.querySelector(".applies-value").addEventListener("change", makeDirty, false); + e.querySelector(".applies-value").addEventListener("input", makeDirty, false); e.querySelector(".applies-type").addEventListener("change", makeDirty, false); } else if (showingEverything || list.hasChildNodes()) { e = appliesToTemplate.cloneNode(true); @@ -162,7 +162,7 @@ function addAppliesTo(list, name, value) { e.querySelector("[name=applies-type]").value = list.querySelector("li:last-child [name='applies-type']").value; } e.querySelector(".remove-applies-to").addEventListener("click", removeAppliesTo, false); - e.querySelector(".applies-value").addEventListener("change", makeDirty, false); + e.querySelector(".applies-value").addEventListener("input", makeDirty, false); e.querySelector(".applies-type").addEventListener("change", makeDirty, false); } else { e = appliesToEverythingTemplate.cloneNode(true);