From 06589d10c905d123ce39ee10a9b58402ba709e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Fri, 27 Dec 2024 13:09:18 +0100 Subject: [PATCH] when finishing a geoetry on mobile in the editor, don't break the UI --- src/c3nav/editor/static/editor/js/editor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 1b266105..0217e006 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -1470,7 +1470,11 @@ editor = { const form = $('#sidebar').find('.content').find('form.creation-lock'); form.removeClass('creation-lock') if (editor._creating_type !== 'multipoint') { - form.find('input:not([type=hidden], .btn)').first().focus(); + if ($('#responsive_switch').is(':visible')) { + $('#show_details').click(); + } else { + form.find('input:not([type=hidden], .btn)').first().focus(); + } } } },