From 8c18a54d57b890f391b8260c96e570b756b02732 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 14 Jul 2018 21:19:28 +0300 Subject: [PATCH] prevent default on dummy wrappers --- edit/sections.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edit/sections.js b/edit/sections.js index 77a0f61a..99b6f198 100644 --- a/edit/sections.js +++ b/edit/sections.js @@ -156,6 +156,8 @@ function addAppliesTo(list, type, value) { if (this instanceof Node) { clickedItem = this.closest('.applies-to-item'); list = this.closest('.applies-to-list'); + // dummy wrapper was clicked + if (arguments[0] instanceof Event) arguments[0].preventDefault(); } const showingEverything = $('.applies-to-everything', list); // blow away 'Everything' if it's there @@ -416,6 +418,7 @@ function getSectionsHashes() { } function removeAppliesTo(event) { + event.preventDefault(); const appliesTo = event.target.closest('.applies-to-item'); const appliesToList = appliesTo.closest('.applies-to-list'); removeAreaAndSetDirty(appliesTo);