You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/04/05 19:44:00 UTC
[jira] [Commented] (TAP5-2669) Tapestry Form.js running on non
Tapestry forms
[ https://issues.apache.org/jira/browse/TAP5-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17315054#comment-17315054 ]
ASF subversion and git services commented on TAP5-2669:
-------------------------------------------------------
Commit 06d9e0515edee50157201f97b69df86179195b3b in tapestry-5's branch refs/heads/5.6.x from Thiago H. de Paula Figueiredo
[ https://gitbox.apache.org/repos/asf?p=tapestry-5.git;h=06d9e05 ]
TAP5-2669: Tapestry Form.js running on non Tapestry forms
> Tapestry Form.js running on non Tapestry forms
> ----------------------------------------------
>
> Key: TAP5-2669
> URL: https://issues.apache.org/jira/browse/TAP5-2669
> Project: Tapestry 5
> Issue Type: Bug
> Reporter: Alex Craddock
> Assignee: Thiago Henrique De Paula Figueiredo
> Priority: Major
>
> There is an issue when a non Tapestry form is being submitted, the Javascript in Form.js is triggered, specifically,
>
> {code:java}
> dom.onDocument("click", "input[type=submit], input[type=image]", function() { setSubmittingHidden(dom(this.element.form), this); });
> {code}
>
> This is then causing a t:submit parameter to be added to the request query parameters via,
>
> {code:java}
> setSubmittingHidden
> hidden = form.findFirst("[name='t:submit']");
> if (!hidden) {
> firstHidden = form.findFirst("input[type=hidden]");
> hidden = dom.create("input", {
> type: "hidden",
> name: "t:submit"
> });
> firstHidden.insertBefore(hidden);
> }
> name = isCancel ? "cancel" : submitter.element.name;
> hidden.value("[\"" + submitter.element.id + "\",\"" + name + "\"]");
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)