Browse Source

[FIX] onchange to onkeypress

pull/1/head
Ildar Nasyrov 9 years ago
parent
commit
ddb5537d68
  1. 9
      static/src/js/mail_recovery.js

9
static/src/js/mail_recovery.js

@ -5,13 +5,16 @@ openerp.mail_recovery = function (session) {
bind_events: function () { bind_events: function () {
var self = this; var self = this;
this.$('textarea').on('focus', self.on_focus_textarea); this.$('textarea').on('focus', self.on_focus_textarea);
this.$('textarea').on('change', self.on_change_textarea);
this.$('textarea').on('keypress', self.on_keypress_textarea);
this._super(); this._super();
}, },
on_focus_textarea: function(event) { on_focus_textarea: function(event) {
$(event.target).val(window.localStorage['message_storage']);
var $input = $(event.target);
if ($input.val() == false) {
$input.val(window.localStorage['message_storage']);
}
}, },
on_change_textarea: function(event) {
on_keypress_textarea: function(event) {
window.localStorage['message_storage'] = $(event.target).val(); window.localStorage['message_storage'] = $(event.target).val();
}, },
on_message_post: function (event) { on_message_post: function (event) {

Loading…
Cancel
Save