Remove async resizing from external embed player (#2936)
* remove debug adjust youtube shorts height fix webview style simplify styles fix resizing make it more clear remove async resizes from external player * remove comment * ts * reverse aspect
This commit is contained in:
parent
09eee05f8b
commit
fab6c286f4
3 changed files with 48 additions and 84 deletions
|
|
@ -1,11 +1,14 @@
|
|||
import React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {View, ViewStyle} from 'react-native'
|
||||
|
||||
/**
|
||||
* This utility function captures events and stops
|
||||
* them from propagating upwards.
|
||||
*/
|
||||
export function EventStopper({children}: React.PropsWithChildren<{}>) {
|
||||
export function EventStopper({
|
||||
children,
|
||||
style,
|
||||
}: React.PropsWithChildren<{style?: ViewStyle | ViewStyle[]}>) {
|
||||
const stop = (e: any) => {
|
||||
e.stopPropagation()
|
||||
}
|
||||
|
|
@ -15,7 +18,8 @@ export function EventStopper({children}: React.PropsWithChildren<{}>) {
|
|||
onTouchEnd={stop}
|
||||
// @ts-ignore web only -prf
|
||||
onClick={stop}
|
||||
onKeyDown={stop}>
|
||||
onKeyDown={stop}
|
||||
style={style}>
|
||||
{children}
|
||||
</View>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue