feat(polls): answer and question inputs native updates (#13166)

* feat(polls): fixed scroll inside components and added pointerEvents auto for question and answer inputs
pull/13160/head jitsi-meet_8509
Calinteodor 2 years ago committed by GitHub
parent 5d840a5072
commit a828cacbfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      react/features/base/ui/components/native/Input.tsx
  2. 6
      react/features/polls/components/native/PollCreate.js
  3. 2
      react/features/polls/components/native/PollsPane.js

@ -38,6 +38,7 @@ interface IProps extends IInputProps {
onFocus?: ((e: NativeSyntheticEvent<TextInputFocusEventData>) => void) | undefined;
onKeyPress?: ((e: NativeSyntheticEvent<TextInputKeyPressEventData>) => void) | undefined;
onSubmitEditing?: (value: string) => void;
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
returnKeyType?: ReturnKeyTypeOptions | undefined;
secureTextEntry?: boolean | undefined;
textContentType?: any;
@ -70,6 +71,7 @@ const Input = forwardRef<TextInput, IInputProps>(({
onKeyPress,
onSubmitEditing,
placeholder,
pointerEvents,
returnKeyType,
secureTextEntry,
textContentType,
@ -134,6 +136,7 @@ const Input = forwardRef<TextInput, IInputProps>(({
onSubmitEditing = { handleSubmitEditing }
placeholder = { placeholder }
placeholderTextColor = { BaseTheme.palette.text02 }
pointerEvents = { pointerEvents }
ref = { ref }
returnKeyType = { returnKeyType }
secureTextEntry = { secureTextEntry }

@ -109,6 +109,9 @@ const PollCreate = (props: AbstractProps) => {
onChange = { text => setAnswer(index, text) }
onKeyPress = { ev => onAnswerKeyDown(index, ev) }
placeholder = { t('polls.create.answerPlaceholder', { index: index + 1 }) }
// This is set to help the touch event not be propagated to any subviews.
pointerEvents = { 'auto' }
ref = { input => registerFieldRef(index, input) }
value = { answers[index] } />
{
@ -133,6 +136,9 @@ const PollCreate = (props: AbstractProps) => {
onChange = { setQuestion }
onSubmitEditing = { onQuestionKeyDown }
placeholder = { t('polls.create.questionPlaceholder') }
// This is set to help the touch event not be propagated to any subviews.
pointerEvents = { 'auto' }
value = { question } />
<Divider style = { styles.fieldSeparator } />
<FlatList

@ -46,7 +46,7 @@ const PollsPane = (props: AbstractProps) => {
return (
<JitsiScreen
contentContainerStyle = { chatStyles.pollPane }
disableForcedKeyboardDismiss = { !createMode }
disableForcedKeyboardDismiss = { true }
hasTabNavigator = { true }
style = { chatStyles.pollPaneContainer }>
{

Loading…
Cancel
Save