8000 Added info that not all browsers do submit a button when user submits… by ThomasLandauer · Pull Request #7932 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Added info that not all browsers do submit a button when user submits… 8000 #7932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

ThomasLandauer
Copy link
Contributor

… by pressing Enter

This fact has been filed as a (bogus) bug: symfony/symfony#10611

… by pressing Enter

This fact has been filed as a (bogus) bug: symfony/symfony#10611
8000
Copy link
Member
@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThomasLandauer thanks for this! I'd love to have a concrete list of browsers that don't behave as expected ... but I guess it's difficult to gather the list and maintain it updated.

@ThomasLandauer
Copy link
Contributor Author

@javiereguiluz: Yeah, sure! But I don't know a list either ;-)

@robfrawley
Copy link
Contributor

We should really point out the browser(s) that are affected by this behavior. The note isn't particularly useful without this context. Further, if we don't know what browsers perform in this unexpected manner, then what is the empirical evidence this occurs at all, right? :-)

@ThomasLandauer
Copy link
Contributor Author

I did some testing with the browsers I have at hand:
Submit-Button included in submitted form-data:
IE 5: no
IE 7: no
IE 8: no

Firefox 54: yes
Chrome 59: yes
Edge: yes
IE 11: yes
IE 10: yes
IE 9: yes

But I'm hesitant to enter the info that IE 8- is affected, since this might give the impression that only IE 8- is affected - which I just don't know.

Anyway, I think that giving a (debatably incomplete) information that problems might occur is still better than not mentioning it at all!

@robfrawley
Copy link
Contributor
robfrawley commented Jul 9, 2017

Is it worth mentioning something that doesn't affect any actively supported browsers? All the ones that behave incorrectly are EOL. Just a thought, not necessarily against voting against this change, just wanted to bring up the point. That said, your points are valid as well.

@ThomasLandauer
Copy link
Contributor Author

Well, as I said, I don't know if other (mobile?) browsers or robots are affected too. The only thing I know is that I did stumble over this issue somehow - otherwise I wouldn't have filed it. But now, 2.5 months later, I can't remember any details...

Other scenario: If you have a GET-form, and there are some links out there, linking to some of your search results, and then you transfer your app to Symfony, those links might break.

So my gut feeling says: In uncertain situations it's better to have some warning than not.


  When the user submits your form by pressing the ``Enter`` key on the keyboard,
some browsers do include the submit button field in the form data, and
  some don't. So you should take care of handling the case when ``isClicked()``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, reading this note I understand that in all my apps I should take care the the user agent header before performing the check...

Not sure we should care.

@javiereguiluz
Copy link
Member

Given that this only affects to Internet Explorer 8 and earlier, I prefer to not add this warning in the docs.

However, for those unfortunate people who must deal with this error, let's add some SEO-friendly phrases so they can find this issue when googling about this:

  • Symfony Forms error: when submitting a form using the enter button, isClicked() returns true
  • Why does the isClicked() method return true in Symfony when I submit a form pressing the Enter key
  • Symfony Forms return true for isClicked() when no button is pressed

@ThomasLandauer ThomasLandauer deleted the patch-13 branch August 17, 2018 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0