It happens in our application once we have upgraded to 9.1d
Here it goes a simplified example to reproduce it:
https://mega.co.nz/#!hFAV1KaZ!LrRzgVQP4QeV__3me-pn01Cjd2ZjPHce_jZAIDwRJag
In 9.1d if a tab has a short label, it has a minimun width (instead of fit its width to the text). This can be reproduced using "test.html" (looking at the first tab)
In 8.3d, if the tab has a short text, due to the "width: 1" of the styles, the tab width fits the text. This can be reproduced using "test-hack.html" (looking at the first tab)
I know where the problem has been introduced in your sources:
In Layout.js in 8.3 there was
_userWidth was undefined in 8.3
and in 9.1d it is like
_userWidth is '52' in 8.3
The problem is that this "_getUserWidth" is catch in StatefulCanvas.js, and at the ends returns this:
And it goes through the first statement of the conditional, so it gets the userWidth of the label (at least, it seems that 52) instead of the width of button (undefined)
Said that, we need the same we have before with 8.3: tab width fits the tab label
NOTE: To do the "test-hack.html" I have removed the "_getUserWidth" from the obfuscated StatefulCanvas.js to emulate a behavior similar to 8.3
Here it goes a simplified example to reproduce it:
https://mega.co.nz/#!hFAV1KaZ!LrRzgVQP4QeV__3me-pn01Cjd2ZjPHce_jZAIDwRJag
In 9.1d if a tab has a short label, it has a minimun width (instead of fit its width to the text). This can be reproduced using "test.html" (looking at the first tab)
In 8.3d, if the tab has a short text, due to the "width: 1" of the styles, the tab width fits the text. This can be reproduced using "test-hack.html" (looking at the first tab)
I know where the problem has been introduced in your sources:
In Layout.js in 8.3 there was
Code:
if (!newMember._userWidth && !newMember._widthSetAfterInit) {
and in 9.1d it is like
Code:
if (!newMember._getUserWidth() && !newMember._widthSetAfterInit) {
The problem is that this "_getUserWidth" is catch in StatefulCanvas.js, and at the ends returns this:
Code:
this.shouldShowLabel() && this.label ? this.label._getUserWidth() : this.Super("_getUserWidth", arguments)
Said that, we need the same we have before with 8.3: tab width fits the tab label
NOTE: To do the "test-hack.html" I have removed the "_getUserWidth" from the obfuscated StatefulCanvas.js to emulate a behavior similar to 8.3
Comment