File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -196,16 +196,20 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
196
196
owner . callLoaded ( ) ;
197
197
}
198
198
199
- if ( bottomSheetOptions . options . canTouchBehind ) {
199
+ if ( bottomSheetOptions . options . canTouchBehind ) {
200
200
const coordinator = view . getParent ( ) ;
201
- coordinator . findViewById ( getId ( "touch_outside" ) ) . setOnTouchListener ( new android . view . View . OnTouchListener ( {
202
- onTouch : function ( view , event ) {
203
- fragment . getActivity ( ) . dispatchTouchEvent ( event ) ;
204
- return false ;
205
- }
206
- } ) ) ;
201
+ if ( coordinator instanceof android . view . View ) {
202
+ coordinator . findViewById ( getId ( 'touch_outside' ) ) . setOnTouchListener (
203
+ new android . view . View . OnTouchListener ( {
204
+ onTouch ( view , event ) {
205
+ fragment . getActivity ( ) . dispatchTouchEvent ( event ) ;
206
+ return false ;
207
+ }
208
+ } )
209
+ ) ;
210
+ }
207
211
}
208
-
212
+
209
213
bottomSheetOptions . shownCallback ( ) ;
210
214
} ,
211
215
You can’t perform that action at this time.
0 commit comments