diff options
Diffstat (limited to 'misc/teaser.js')
-rw-r--r-- | misc/teaser.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/misc/teaser.js b/misc/teaser.js index 37e31873d..633d39e6c 100644 --- a/misc/teaser.js +++ b/misc/teaser.js @@ -70,13 +70,20 @@ Drupal.behaviors.teaser = function(context) { body[0].value = trim(text[1]); $(teaser).attr('disabled', ''); $('input', button).val(Drupal.t('Join summary')).toggle(join_teaser, split_teaser); - $(teaser).show(); } else { - $(teaser).hide(); $('input', button).val(Drupal.t('Split summary at cursor')).toggle(split_teaser, join_teaser); $(checkbox).hide(); } + // Make sure that textarea.js has done its magic to ensure proper visibility state. + if (Drupal.behaviors.textarea && teaser.is(('.form-textarea:not(.textarea-processed)'))) { + Drupal.behaviors.textarea(teaser.parentNode); + } + // Set initial visibility + if ($(teaser).is('[@disabled]')) { + $(teaser).parent().hide(); + } + }); }; |