Skip to content

Instantly share code, notes, and snippets.

@globalspin
Last active December 28, 2015 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save globalspin/7555796 to your computer and use it in GitHub Desktop.
Save globalspin/7555796 to your computer and use it in GitHub Desktop.
This behaves differently in Safari 6.1 and Chrome 31. Safari chooses the radio option (value "none") when the button is pressed. Chrome does not.
<!DOCTYPE html>
<html>
<head>
<title>button + radio test</title>
</head>
<body>
<form>
<label><input type="radio" name="my_option" value="1" checked> This is the first option.</label>
<label><input type="radio" name="my_option" value="2"> This is the second option.</label>
<label><input type="radio" name="my_option" value="none"> <button type="button">I choose nothing!</button></label>
</form>
</body>
</html>
@globalspin
Copy link
Author

Looks like Firefox 23 does the same thing Safari does.

@reshun
Copy link

reshun commented Nov 20, 2013

@hober
Copy link

hober commented Nov 20, 2013

Probably a regression due to this change: https://chromium.googlesource.com/chromium/blink/+/237028d603d5fe587ec282f6d2cf3b5a31c01902

You should file a bug with Chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment