From 83731f5a68544f612e0fca787ddc7b43d7d39ae6 Mon Sep 17 00:00:00 2001 From: Adam Wolf Date: Thu, 28 Oct 2021 22:22:46 -0500 Subject: [PATCH] Tweak JS so Safari can choose admin actions I noticed that Safari was submitting both the empty option and the selected options back to the server. Digging into it, I was able to get Safari to deselect the --------- option by using '[selected]' as the selector. For #658 --- archivebox/templates/admin/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archivebox/templates/admin/base.html b/archivebox/templates/admin/base.html index 9dc62516..0592fa0a 100644 --- a/archivebox/templates/admin/base.html +++ b/archivebox/templates/admin/base.html @@ -197,7 +197,7 @@ // select the action button from the dropdown container.find('select[name=action]') - .find('op:selected').removeAttr('selected').end() + .find('[selected]').removeAttr('selected').end() .find('[value=' + action_type + ']').attr('selected', 'selected').click() // click submit & replace the archivebox logo with a spinner