Changeset 620
- Timestamp:
- 05/02/09 21:57:21 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wymeditor/jquery.wymeditor.js
r619 r620 852 852 853 853 //handle keyup event on html value: set the editor value 854 jQuery(this._box).find(this._options.htmlValSelector).keyup(function() { 855 jQuery(wym._doc.body).html(jQuery(this).val()); 856 }); 857 854 //handle focus/blur events to check if the element has focus, see #147 855 jQuery(this._box).find(this._options.htmlValSelector) 856 .keyup(function() { jQuery(wym._doc.body).html(jQuery(this).val());}) 857 .focus(function() { jQuery(this).toggleClass('hasfocus'); }) 858 .blur(function() { jQuery(this).toggleClass('hasfocus'); }); 859 858 860 //handle click event on classes buttons 859 861 jQuery(this._box).find(this._options.classSelector).click(function() { … … 1146 1148 var html = this.xhtml(); 1147 1149 jQuery(this._element).val(html); 1148 jQuery(this._box).find(this._options.htmlValSelector). val(html);1150 jQuery(this._box).find(this._options.htmlValSelector).not('.hasfocus').val(html); //#147 1149 1151 }; 1150 1152
Note: See TracChangeset
for help on using the changeset viewer.