From 5826504d0f9777a5ca4349df46a19d7b4e5e5f52 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 14 Nov 2018 14:03:53 +0000 Subject: [PATCH 1/2] don't add empty values --- pandora/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 6f7e45b5..d15b30f6 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1105,7 +1105,7 @@ class Item(models.Model): for a in Entity.objects.filter(id__in=[ox.fromAZ(i) for i in current_values]).values('name') ] current_values = [ox.decode_html(ox.strip_tags(v.replace('
', ' '))) for v in current_values] - current_values = [unicodedata.normalize('NFKD', v) for v in current_values] + current_values = [unicodedata.normalize('NFKD', v) for v in current_values if v] self.update_facet_values(key, current_values) def update_facet_values(self, key, current_values): From b56fdeea721712d0750f15db4fc1134b93ada400 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 14 Nov 2018 14:23:07 +0000 Subject: [PATCH 2/2] don't steal focus from input elements --- static/js/editPanel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/editPanel.js b/static/js/editPanel.js index a006613c..21c98623 100644 --- a/static/js/editPanel.js +++ b/static/js/editPanel.js @@ -412,7 +412,9 @@ pandora.ui.editPanel = function(isEmbed) { updateSmallTimelineURL(); ui.edits[ui.edit].view == 'grid' && enableDragAndDrop(); - that.gainFocus(); + if (!Ox.Focus.focusedElementIsInput()) { + that.gainFocus(); + } } function renderEdits() {