From 94512ee0628dc0d2b697441a4355ace54b6515cd Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 15 Mar 2024 03:38:13 +0100 Subject: [PATCH] Fix Citation modal responsiveness and clipboard copy (#29799) The modal was broken in two ways: - On small screens, the input box was partially hanging outside the modal. Fixed with flexbox and increased modal width. - The clipboard copy was not working because the modal had both `data-clipboard-text` and `data-clipboard-target`, while we only support one of those. Made a small tweak in clipboard as well so that it will still fall back to target if text is empty. --- templates/repo/cite/cite_buttons.tmpl | 2 +- templates/repo/cite/cite_modal.tmpl | 14 ++++++-------- web_src/css/repo.css | 10 +++------- web_src/js/features/clipboard.js | 6 ++---- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/templates/repo/cite/cite_buttons.tmpl b/templates/repo/cite/cite_buttons.tmpl index 9953c92c8aee..426ca3858e50 100644 --- a/templates/repo/cite/cite_buttons.tmpl +++ b/templates/repo/cite/cite_buttons.tmpl @@ -6,6 +6,6 @@ BibTeX - diff --git a/templates/repo/cite/cite_modal.tmpl b/templates/repo/cite/cite_modal.tmpl index c34c77e0c415..fb251442caa5 100644 --- a/templates/repo/cite/cite_modal.tmpl +++ b/templates/repo/cite/cite_modal.tmpl @@ -1,16 +1,14 @@ -