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

Commit

Permalink
Missing cherry-pick from #12719 for 0.23.x branch
Browse files Browse the repository at this point in the history
Fix #14528
  • Loading branch information
petemill committed Jun 22, 2018
1 parent 7875293 commit 516f536
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions app/renderer/components/tabs/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class Tab extends React.Component {
props.isPinnedTab = isPinned
props.isPrivateTab = privateState.isPrivateTab(currentWindow, frameKey)
props.isActive = !!frameStateUtil.isFrameKeyActive(currentWindow, frameKey)
props.tabWidth = currentWindow.getIn(['ui', 'tabs', 'fixTabWidth'])
props.tabWidth = isPinned ? null : currentWindow.getIn(['ui', 'tabs', 'fixTabWidth'])
props.isPreview = frameKey === previewFrameKey /* || frameKey === 2 */ // <-- uncomment to force 1 preview tab for style inspection
props.anyTabIsPreview = previewFrameKey != null
props.themeColor = tabUIState.getThemeColor(currentWindow, frameKey)
Expand Down Expand Up @@ -331,13 +331,6 @@ class Tab extends React.Component {
return props
}

componentWillReceiveProps (nextProps) {
if (this.props.tabWidth && !nextProps.tabWidth) {
// remember the width so we can transition from it
this.originalWidth = this.elementRef.getBoundingClientRect().width
}
}

componentDidUpdate (prevProps) {
if (prevProps.tabWidth && !this.props.tabWidth && !this.props.partOfFullPageSet) {
window.requestAnimationFrame(() => {
Expand Down Expand Up @@ -480,7 +473,7 @@ const styles = StyleSheet.create({
boxSizing: 'border-box',
position: 'relative',
overflow: 'hidden',
flex: 1,
flex: '1 1 0',
// put the top border underneath tab-stip top border, and
// the left border underneath the previous tab's right border
margin: `0 0 0 -${theme.tab.borderWidth}px`,
Expand Down

1 comment on commit 516f536

@bsclifton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.