Skip to content
Browse files

Merge pull request #60 from Yuffster/patch-1

Quick fix to make sure the render event fires on initialization
  • Loading branch information...
2 parents facc10b + aacb695 commit a35d306182c0c4283b04ef1379ef30a09657339c @cheeaun committed Jul 13, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 Source/MooEditable/MooEditable.js
View
9 Source/MooEditable/MooEditable.js
@@ -152,10 +152,11 @@ this.MooEditable = new Class({
// Update & cleanup content before submit
if (this.options.handleSubmit){
this.form = this.textarea.getParent('form');
- if (!this.form) return;
- this.form.addEvent('submit', function(){
- if (self.mode == 'iframe') self.saveContent();
- });
+ if (this.form) {
+ this.form.addEvent('submit', function(){
+ if (self.mode == 'iframe') self.saveContent();
+ });
+ }
}
this.fireEvent('render', this);

0 comments on commit a35d306

Please sign in to comment.
Something went wrong with that request. Please try again.