ismail-s / fireblog

A basic blog (in Python)
https://ismail-s.github.io/fireblog
GNU General Public License v2.0
0 stars 0 forks source link

Make all form submits work by pressing Enter #82

Open ismail-s opened 8 years ago

ismail-s commented 8 years ago

Well, when I say all, I am excluding when within a textarea ofc.

ismail-s commented 8 years ago

Basically, it is the polymer submits that are the ones to sort out... One way of sorting this out is to:

  1. Have a hidden input type="submit" button on the form so pressing Enter would normally submit the form
  2. Use javascript to intercept pressing Enter in the form, and handle it in the custom way, by sending a click to the polymer button, however you do that. See this link.