Permalink
Browse files

MDL-33186 Ensure that the comment textarea exists before toggling it

  • Loading branch information...
1 parent 21878be commit 088258c16018f90cded4c1d94312fc95f0a2ca1a @andrewnicols andrewnicols committed May 22, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 comment/comment.js
View
3 comment/comment.js
@@ -385,6 +385,9 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
},
toggle_textarea: function(focus) {
var t = Y.one('#dlg-content-'+this.client_id);
+ if (!t) {
+ return false;
+ }
if (focus) {
if (t.get('value') == M.str.moodle.addcomment) {
t.set('value', '');

0 comments on commit 088258c

Please sign in to comment.