diff --git a/public/js/compose.js b/public/js/compose.js index acb43e4..e36dc70 100644 --- a/public/js/compose.js +++ b/public/js/compose.js @@ -33,7 +33,8 @@ const Compose = { m("button[type=submit]", { class:"btn btn-sm btn-block btn-primary", onclick: sendMail, - disabled: !state.compose.body || !state.compose.subject || !state.compose.recipient + disabled: !state.compose.body || !state.compose.subject || !state.compose.recipient, + onsubmit: function(e) { e.preventDefault(); } }, "Submit") ]) ]; diff --git a/public/js/login.js b/public/js/login.js index 3af4259..dbebb39 100644 --- a/public/js/login.js +++ b/public/js/login.js @@ -9,7 +9,8 @@ var LoginButton = function(){ return m("button", { class:"btn btn-sm btn-block btn-primary", disabled: !state.loginState.username || !state.loginState.password, - onclick: function(){ login(state.loginState.username, state.loginState.password); } + onclick: function(){ login(state.loginState.username, state.loginState.password); }, + onsubmit: function(e){ e.preventDefault(); } }, [spinner, " Login ", infoText]); }; diff --git a/src/promise/sendmessage.js b/src/promise/sendmessage.js index 2f0572a..7501d87 100644 --- a/src/promise/sendmessage.js +++ b/src/promise/sendmessage.js @@ -7,8 +7,8 @@ module.exports = (playername, recipient, subject, text) => new Promise(function( events.emit("channel-send", { type: "send", data: { - src: playername, - dst: recipient, + from: playername, + to: recipient, subject: subject || "", body: text || "" }