Prevent enter button reloading page when focus is on meta-title in PSM

closes #5854

- adds an action that returns false on form submission
This commit is contained in:
cobbspur 2015-09-24 18:49:36 +01:00
parent cce1cc55ca
commit a8121c8230
2 changed files with 5 additions and 1 deletions

View File

@ -201,6 +201,10 @@ export default Ember.Controller.extend(SettingsMenuMixin, {
},
actions: {
discardEnter: function () {
return false;
},
togglePage: function () {
var self = this;

View File

@ -105,7 +105,7 @@
</div>
<div class="settings-menu-content">
<form>
<form {{action "discardEnter" on="submit"}}>
{{#gh-form-group errors=model.errors property="meta_title"}}
<label for="meta-title">Meta Title</label>
{{gh-input class="post-setting-meta-title" id="meta-title" value=metaTitleScratch name="post-setting-meta-title" focus-out="setMetaTitle" stopEnterKeyDownPropagation="true"}}