Skip to content

Conversation

simbabque
Copy link
Contributor

This fixes #1847. It was mostly related to the default behavior of some browsers. Possibly that's why it might not have shown up for everyone.

The removeLabel JS function seems to not be used at all any more. It operates on elements with the .control class, but that also seems not to be used at all. There are some references to that class in root/static/openlayers/OpenLayers.js, but I am not sure if that's related. Both the JS function as well as the corresponding less code in root/less/account.less can possibly be removed.
Some browsers apparently think that a button is a submit-like button by default. If there's JS on that button, it gets executed when one presses enter in the form. It seems to pick the first button to occur. This only happens in some browsers, and lead to additional email rows being added whenever enter was pressed in any form field. Also see http://stackoverflow.com/a/13534643/1331451.

This changes the behavior insofar that now whenever enter is pressed, the form is submitted and the profile gets saved.

Fixes metacpan#1847
@coveralls
Copy link

coveralls commented Feb 26, 2017

Coverage Status

Coverage remained the same at 69.5% when pulling 7e2baa4 on simbabque:gh-1847 into 63fcda1 on metacpan:master.

@oalders oalders merged commit fe08a3d into metacpan:master Feb 27, 2017
@simbabque simbabque deleted the gh-1847 branch February 27, 2017 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pressing enter in any text box in the profile edit screen adds a new email field

3 participants