From 2a2bfca1744df5cb10c9f48947611f53dba427b0 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Fri, 30 Oct 2020 09:29:51 -0400 Subject: [PATCH] Change implementation of #8141 --- modules/ui/sections/background_list.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ui/sections/background_list.js b/modules/ui/sections/background_list.js index ba25f15ba..e6cd4d809 100644 --- a/modules/ui/sections/background_list.js +++ b/modules/ui/sections/background_list.js @@ -211,7 +211,10 @@ export function uiSectionBackgroundList(context) { .title(t.html('settings.custom_background.tooltip')) .placement((localizer.textDirection() === 'rtl') ? 'right' : 'left') ) - .on('click', editCustom) + .on('click', function(d3_event) { + d3_event.preventDefault(); + editCustom(); + }) .call(svgIcon('#iD-icon-more')); enter.filter(function(d) { return d.best(); }) @@ -265,8 +268,7 @@ export function uiSectionBackgroundList(context) { } - function editCustom(d3_event) { - if (d3_event !== undefined) d3_event.preventDefault(); + function editCustom() { context.container() .call(_settingsCustomBackground); }