File tree 2 files changed +11
-7
lines changed
src/shared/components/Terms
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 51
51
"filestack-js" : " ^1.7.7" ,
52
52
"filestack-react" : " ^2.0.0" ,
53
53
"flag-icon-css" : " ^3.3.0" ,
54
+ "focus-trap-react" : " ^6.0.0" ,
54
55
"helmet" : " ^3.12.1" ,
55
56
"highlight.js" : " ^9.13.1" ,
56
57
"html-to-text" : " ^3.3.0" ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import React from 'react';
10
10
import PT from 'prop-types' ;
11
11
import { Modal , PrimaryButton , Button } from 'topcoder-react-ui-kit' ;
12
12
import LoadingIndicator from 'components/LoadingIndicator' ;
13
+ import FocusTrap from 'focus-trap-react' ;
13
14
import TermDetails from './TermDetails' ;
14
15
15
16
import style from './styles.scss' ;
@@ -159,15 +160,16 @@ export default class Terms extends React.Component {
159
160
160
161
return (
161
162
< div key = { ( selectedTerm || { } ) . termsOfUseId } >
162
- < Modal
163
- onCancel = { onCancel }
164
- theme = { { container : style [ 'modal-container' ] } }
165
- >
166
- {
163
+ < FocusTrap >
164
+ < Modal
165
+ onCancel = { onCancel }
166
+ theme = { { container : style [ 'modal-container' ] } }
167
+ >
168
+ {
167
169
isLoadingTerms
168
170
&& < LoadingIndicator />
169
171
}
170
- {
172
+ {
171
173
! isLoadingTerms && (
172
174
< div styleName = "modal-content" ref = { this . terms } tabIndex = "0" >
173
175
< div styleName = "title" >
@@ -327,7 +329,8 @@ export default class Terms extends React.Component {
327
329
</ div >
328
330
)
329
331
}
330
- </ Modal >
332
+ </ Modal >
333
+ </ FocusTrap >
331
334
</ div >
332
335
) ;
333
336
}
You can’t perform that action at this time.
0 commit comments