@@ -253,7 +253,7 @@ function addFocusToSelection(
253
253
// the call to 'selection.extend' is about to throw
254
254
DraftJsDebugLogging . logSelectionStateFailure ( {
255
255
anonymizedDom : getAnonymizedEditorDOM ( node ) ,
256
- extraParams : JSON . stringify ( { offset : offset } ) ,
256
+ extraParams : JSON . stringify ( { offset} ) ,
257
257
selectionState : JSON . stringify ( selectionState . toJS ( ) ) ,
258
258
} ) ;
259
259
}
@@ -292,7 +292,7 @@ function addFocusToSelection(
292
292
: null ,
293
293
selectionFocusOffset : selection . focusOffset ,
294
294
message : e ? '' + e : null ,
295
- offset : offset ,
295
+ offset,
296
296
} ,
297
297
null ,
298
298
2 ,
@@ -329,7 +329,7 @@ function addPointToSelection(
329
329
// in this case we know that the call to 'range.setStart' is about to throw
330
330
DraftJsDebugLogging . logSelectionStateFailure ( {
331
331
anonymizedDom : getAnonymizedEditorDOM ( node ) ,
332
- extraParams : JSON . stringify ( { offset : offset } ) ,
332
+ extraParams : JSON . stringify ( { offset} ) ,
333
333
selectionState : JSON . stringify ( selectionState . toJS ( ) ) ,
334
334
} ) ;
335
335
DraftEffects . handleExtensionCausedError ( ) ;
@@ -340,8 +340,11 @@ function addPointToSelection(
340
340
if ( isIE ) {
341
341
try {
342
342
selection . addRange ( range ) ;
343
- } catch {
344
- // ignore
343
+ } catch ( e ) {
344
+ if ( __DEV__ ) {
345
+ /* eslint-disable-next-line no-console */
346
+ console . warn ( 'Call to selection.addRange() threw exception: ' , e ) ;
347
+ }
345
348
}
346
349
} else {
347
350
selection . addRange ( range ) ;
0 commit comments