From 536f31bc87ccdc18a632cb4faf538436a96c4bdc Mon Sep 17 00:00:00 2001 From: Maarten Jacobs Date: Thu, 21 Dec 2023 15:03:44 +0100 Subject: [PATCH] Require data-to and data-method attributes together --- priv/static/phoenix_html.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/static/phoenix_html.js b/priv/static/phoenix_html.js index dcd8f0c..fc50fc6 100644 --- a/priv/static/phoenix_html.js +++ b/priv/static/phoenix_html.js @@ -65,7 +65,7 @@ return false; } - if (element.getAttribute("data-method")) { + if (element.getAttribute("data-method") && element.getAttribute("data-to")) { handleClick(element, e.metaKey || e.shiftKey); e.preventDefault(); return false;