From 0400171e0eaad2c2507edab527a9b4549e11e72f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 21 Mar 2015 16:59:33 +0100 Subject: [PATCH] Stop codemirror from jumping around in styleAdd.tpl --- wcfsetup/install/files/acp/templates/styleAdd.tpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/styleAdd.tpl b/wcfsetup/install/files/acp/templates/styleAdd.tpl index 8c97571e9d..edbd7a07a1 100644 --- a/wcfsetup/install/files/acp/templates/styleAdd.tpl +++ b/wcfsetup/install/files/acp/templates/styleAdd.tpl @@ -49,11 +49,13 @@ $target.prev().attr('step', ($target.val() == 'em' ? '0.01' : '1')); }).trigger('change'); - $('.tabMenuContainer').on('wcftabsbeforeactivate', function () { + $('.tabMenuContainer').on('wcftabsactivate', function (event, ui) { + if (ui.newPanel.selector !== '#advanced') return; + setTimeout(function() { $('#individualLess')[0].codemirror.refresh(); $('#overrideLess')[0].codemirror.refresh(); - }, 100); + }, 10); }); }); //]]> @@ -571,4 +573,4 @@ -{include file='footer'} \ No newline at end of file +{include file='footer'} -- 2.20.1