From 04ac2a94a50a0a5bacfdaf8778324169f6b40155 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 5 Jun 2016 13:01:35 +0200 Subject: [PATCH] Added preselection of tab containg an error --- wcfsetup/install/files/js/WCF.Message.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index aea6dce9f1..933b2a161c 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2569,6 +2569,15 @@ $.widget('wcf.messageTabMenu', { this._span = $('').appendTo($nav); var $preselect = this.element.data('preselect'); + + // check for tabs containing '.innerError' and select the first matching one instead + $tabContainers.each(function(index, container) { + if (elBySel('.innerError', container) !== null) { + $preselect = $($tabs[index]).data('name'); + return false; + } + }); + this._tabs = [ ]; this._tabsByName = { }; for (var $i = 0; $i < $tabs.length; $i++) { -- 2.20.1