Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextInput inside Portal behaves incorrectly when using CJK keyboard #3097

Closed
suregi opened this issue Feb 22, 2022 · 6 comments
Closed

TextInput inside Portal behaves incorrectly when using CJK keyboard #3097

suregi opened this issue Feb 22, 2022 · 6 comments

Comments

@suregi
Copy link

suregi commented Feb 22, 2022

Current behaviour

If you type ㅁ ㅏ ㅇ in Korean keyboard, it shows up as ㅁ ㅏ ㅇ

Expected behaviour

It should show up as 망

Code sample

import React from 'react';
import { View } from 'react-native';
import { Portal, Provider, TextInput } from 'react-native-paper';

const App = () => {
	const [val, setVal] = React.useState('');
	const [val2, setVal2] = React.useState('');

	return (
		<Provider>
			<Portal>
				<TextInput
					placeholder={
						'ㅁ ㅏ ㅇ will show up instead of 망' /* when typing ㅁ ㅏ ㅇ in Korean keyboard, it should show up as 망  */
					}
					value={val}
					onChangeText={setVal}
				/>
			</Portal>

			<View style={{ flex: 1, justifyContent: 'center' }}>
				<TextInput
					placeholder={
						'망 will show up correctly' /* outside of Portal, it correctly shows up as 망  */
					}
					value={val2}
					onChangeText={setVal2}
				/>
			</View>
		</Provider>
	);
};

What have you tried

It also happens in older version 4.7.2.

It is most likely to happen with other keyboards such as Japanese or Chinese.

Your Environment

software version
ios or android Android 12
react-native 0.64
react-native-paper 4.11.2
node 14.15.0
@github-actions
Copy link

Couldn't find version numbers for the following packages in the issue:

  • react-native
  • react-native-vector-icons

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

@github-actions
Copy link

Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).

Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.

@github-actions
Copy link

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

@github-actions github-actions bot added the Stale label Mar 25, 2022
@suregi
Copy link
Author

suregi commented Mar 28, 2022

Repro attached here

Please test with Android device and use Korean keyboard. I suppose that you can repro with other CJK keyboard such as Japanese and Chinese also, but I haven't tried myself.

@nappa0326
Copy link

I have the same issue.

@lukewalczak
Copy link
Member

lukewalczak commented Aug 22, 2022

There is an issue with inputs within portals in general, not only in the paper library. Within the other issue you can find the workaround.

Please also check that approach which can be helpful.

Created a handy snack for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants