From 3b960bed766392643c94843122d231272f45b11a Mon Sep 17 00:00:00 2001 From: Chris McCord Date: Tue, 6 Feb 2024 10:15:40 -0500 Subject: [PATCH] =?UTF-8?q?Make=20jos=C3=A9=20happy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/phoenix_html/form.ex | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/phoenix_html/form.ex b/lib/phoenix_html/form.ex index 93d8cd2..80b7888 100644 --- a/lib/phoenix_html/form.ex +++ b/lib/phoenix_html/form.ex @@ -199,12 +199,26 @@ defmodule Phoenix.HTML.Form do """ @spec input_changed?(t, t, field()) :: boolean() def input_changed?( - %Form{impl: impl1, id: id1, name: name1, errors: errors1, source: source1} = form1, - %Form{impl: impl2, id: id2, name: name2, errors: errors2, source: source2} = form2, + %Form{ + impl: impl1, + id: id1, + name: name1, + errors: errors1, + source: source1, + action: action1 + } = form1, + %Form{ + impl: impl2, + id: id2, + name: name2, + errors: errors2, + source: source2, + action: action2 + } = form2, field ) when is_atom(field) or is_binary(field) do - impl1 != impl2 or id1 != id2 or name1 != name2 or form1.action != form2.action or + impl1 != impl2 or id1 != id2 or name1 != name2 or action1 != action2 or field_errors(errors1, field) != field_errors(errors2, field) or impl1.input_value(source1, form1, field) != impl2.input_value(source2, form2, field) end