Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit 516f536

Browse files
committed
Missing cherry-pick from #12719 for 0.23.x branch
Fix #14528
1 parent 7875293 commit 516f536

File tree

1 file changed

+2
-9
lines changed
  • app/renderer/components/tabs

1 file changed

+2
-9
lines changed

app/renderer/components/tabs/tab.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ class Tab extends React.Component {
303303
props.isPinnedTab = isPinned
304304
props.isPrivateTab = privateState.isPrivateTab(currentWindow, frameKey)
305305
props.isActive = !!frameStateUtil.isFrameKeyActive(currentWindow, frameKey)
306-
props.tabWidth = currentWindow.getIn(['ui', 'tabs', 'fixTabWidth'])
306+
props.tabWidth = isPinned ? null : currentWindow.getIn(['ui', 'tabs', 'fixTabWidth'])
307307
props.isPreview = frameKey === previewFrameKey /* || frameKey === 2 */ // <-- uncomment to force 1 preview tab for style inspection
308308
props.anyTabIsPreview = previewFrameKey != null
309309
props.themeColor = tabUIState.getThemeColor(currentWindow, frameKey)
@@ -331,13 +331,6 @@ class Tab extends React.Component {
331331
return props
332332
}
333333

334-
componentWillReceiveProps (nextProps) {
335-
if (this.props.tabWidth && !nextProps.tabWidth) {
336-
// remember the width so we can transition from it
337-
this.originalWidth = this.elementRef.getBoundingClientRect().width
338-
}
339-
}
340-
341334
componentDidUpdate (prevProps) {
342335
if (prevProps.tabWidth && !this.props.tabWidth && !this.props.partOfFullPageSet) {
343336
window.requestAnimationFrame(() => {
@@ -480,7 +473,7 @@ const styles = StyleSheet.create({
480473
boxSizing: 'border-box',
481474
position: 'relative',
482475
overflow: 'hidden',
483-
flex: 1,
476+
flex: '1 1 0',
484477
// put the top border underneath tab-stip top border, and
485478
// the left border underneath the previous tab's right border
486479
margin: `0 0 0 -${theme.tab.borderWidth}px`,

0 commit comments

Comments
 (0)