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

This commit is contained in:
Andrew Robert Nicols
2012-05-24 15:53:57 +08:00
committed by Dan Poltawski
parent c61f5f8730
commit a8cf5e9574
+3
View File
@@ -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', '');