Fixed poll options not properly resizing if tab was inactive
authorAlexander Ebert <ebert@woltlab.com>
Fri, 14 Jun 2013 00:18:27 +0000 (02:18 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 14 Jun 2013 00:18:27 +0000 (02:18 +0200)
wcfsetup/install/files/js/WCF.Poll.js

index d8fa2a59d121d05bc7bad4df0175967e80e9a507..f085a054e5d118c4213d407b4667e2c4cb3242c6 100644 (file)
@@ -51,6 +51,16 @@ WCF.Poll.Management = Class.extend({
                
                // trigger resize event for field length calculation
                this._resize();
+               
+               // update size on tab select
+               var $tabMenuContent = this._container.parents('.tabMenuContent:eq(0)');
+               var $tabMenuContentID = $tabMenuContent.wcfIdentify();
+               var self = this;
+               $tabMenuContent.parents('.tabMenuContainer:eq(0)').on('wcftabsactivate', function(event, ui) {
+                       if (ui.newPanel.wcfIdentify() == $tabMenuContentID) {
+                               self._resize();
+                       }
+               });
        },
        
        /**