I came across this weird behavior difference between Chrome and Safari. If there is label with input and button inside of it, clicking the button will make input get focus in Safari, but in Chrome it won't.
I figured out that adding
e.preventDefault() to button click handler makes Safari behave same as Chrome.
Here is the minimal code example:
<label> <input /> <button>add</button> </label>
Is this a bug in Chrome/Safari or some documented "feature"? What's the "correct" way this html should behave?