File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed
packages/graphql-playground-react/src/components/Playground Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,13 @@ class SideTabs extends React.Component<
98
98
if ( prevProps . activeTabIdx && ! this . props . docs . activeTabIdx ) {
99
99
this . props . setDocsVisible ( this . props . sessionId , false )
100
100
}
101
- return this . setWidth ( )
101
+ this . setWidth ( )
102
+ if (
103
+ this . props . docs . activeTabIdx !== prevProps . docs . activeTabIdx &&
104
+ this . refContentContainer
105
+ ) {
106
+ this . refContentContainer . focus ( )
107
+ }
102
108
}
103
109
104
110
componentDidMount ( ) {
@@ -164,9 +170,6 @@ class SideTabs extends React.Component<
164
170
}
165
171
166
172
private handleTabClick = idx => ( ) => {
167
- if ( ! this . props . docs . docsOpen && this . refContentContainer ) {
168
- this . refContentContainer . focus ( )
169
- }
170
173
if ( this . props . docs . activeTabIdx === idx ) {
171
174
this . props . setDocsVisible ( this . props . sessionId , false )
172
175
return this . setWidth ( )
Original file line number Diff line number Diff line change @@ -152,11 +152,11 @@ const Editor = styled.div`
152
152
}
153
153
`
154
154
const OverflowShadow = styled . div `
155
- position: fixed:
156
- top: 0;
157
- left: 0;
158
- right: 0;
159
- height: 1px;
160
- box-shadow: 0px 1px 3px rgba(17, 17, 17, 0.1);
161
- z-index: 1000;
155
+ position: fixed;
156
+ top: 0;
157
+ left: 0;
158
+ right: 0;
159
+ height: 1px;
160
+ box-shadow: 0px 1px 3px rgba(17, 17, 17, 0.1);
161
+ z-index: 1000;
162
162
`
You can’t perform that action at this time.
0 commit comments