Skip to content

Commit

Permalink
MDL-33186 Ensure that the comment textarea exists before toggling it
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Robert Nicols authored and danpoltawski committed May 24, 2012
1 parent c61f5f8 commit a8cf5e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions comment/comment.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
}, },
toggle_textarea: function(focus) { toggle_textarea: function(focus) {
var t = Y.one('#dlg-content-'+this.client_id); var t = Y.one('#dlg-content-'+this.client_id);
if (!t) {
return false;
}
if (focus) { if (focus) {
if (t.get('value') == M.str.moodle.addcomment) { if (t.get('value') == M.str.moodle.addcomment) {
t.set('value', ''); t.set('value', '');
Expand Down

0 comments on commit a8cf5e9

Please sign in to comment.