Pressing "ENTER" on blue buttons doesn't submit a form anymore

#1

Observed Behavior:

The focused button (e.g. blue buttons) doesn’t submit form on ENTER press in Google Chrome 73.0.3683.86 (Mac). It was working correctly in previous Google Chrome versions.

Also working correctly on Firefox 66.0.2 (Mac).

Expected Behavior:
Form is submitted as if I’ve clicked on the blue button with a mouse/trackpad.

Phabricator Version:
https://secure.phabricator.com/w/changelog/2019.08/

Reproduction Steps:

  1. go to a commit page (e.g. https://secure.phabricator.com/rP18732a0d2ff82614f5d1181981b7a0d1f6b1b3a3)
  2. select code to add inline comment
  3. type in comment text
  4. press TAB key until you see blue “Save Draft” button is focused
  5. hit ENTER

Attempt to add commit-wide comment would also fail (button is focused, but pressing ENTER does nothing).

Basically before pressing enter on any control except textboxes (e.g. a dropdown) caused form to be submitted. Now it doesn’t.

Thank you.

0 Likes

#2

This sounds a lot like a bug in Chrome. Have you reported it to Chrome?

0 Likes

#3

I’ve created an example to demonstrate submit on ENTER here: https://jsbin.com/miduruziga/edit?html,output

Just in case I’m pasting it’s HTML also here:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
	
	<style type="text/css">
		input:focus {
			border: 1px solid red;
			font-weight: bold;
		}
	</style>
</head>
<body>

	<form method="post">
		Field 1: <select name="form_input1">
			<option value="1">Option 1</option>
			<option value="2">Option 2</option>
		</select><br/>
		Field 2: <input type="text" name="form_input2"/><br/>
		Field 3: <input type="text" name="form_input3"/><br/>
		<br/>
		<input type="submit" value="Submit button"/>
	</form>
	
</body>
</html>

As you can see from above example submit on ENTER works perfectly on any of the fields.

Phabricator might be doing some special keypress handling (e.g. because forms are pretty complex), not a regular form submit that no longer works in Google Chrome, but still works in Firefox.


Update (I wasn’t able to add new comment on closed topic):

The problem was caused by “Evernote Web Clipper” Google Chrome extension, that with “Shortcuts” enabled was catching them (likely event propogation was disabled in the process) and therefore website itself wasn’t able to detect keypress.

0 Likes

#4

Nope I haven’t.

0 Likes

closed #5
0 Likes