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 {
196196 owner . callLoaded ( ) ;
197197 }
198198
199- if ( bottomSheetOptions . options . canTouchBehind ) {
199+ if ( bottomSheetOptions . options . canTouchBehind ) {
200200 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+ }
207211 }
208-
212+
209213 bottomSheetOptions . shownCallback ( ) ;
210214 } ,
211215
You can’t perform that action at this time.
0 commit comments