File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = ( ) => ( {
2
+ start : 0 ,
3
+ end : 0 ,
4
+ } ) ;
Original file line number Diff line number Diff line change @@ -294,19 +294,8 @@ class ReactTextareaAutocomplete extends React.Component {
294
294
return ;
295
295
}
296
296
297
- /*
298
- JSDOM has some issue with getComputedStyles which is called by getCaretCoordinates
299
- so this try - catch is walk-around for Jest
300
- */
301
- try {
302
- const { top, left } = getCaretCoordinates ( textarea , selectionEnd ) ;
303
- this . setState ( { top, left } ) ;
304
- } catch ( err ) {
305
- //eslint-disable-next-line
306
- console . warn (
307
- 'RTA: failed to get caret coordinates. This is not a browser?' ,
308
- ) ;
309
- }
297
+ const { top, left } = getCaretCoordinates ( textarea , selectionEnd ) ;
298
+ this . setState ( { top, left } ) ;
310
299
311
300
this . setState (
312
301
{
You can’t perform that action at this time.
0 commit comments