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

[ BUG ] Textarea and Input can't work properly with Dialog #248

Open
hlf2016 opened this issue Sep 25, 2024 · 1 comment
Open

[ BUG ] Textarea and Input can't work properly with Dialog #248

hlf2016 opened this issue Sep 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hlf2016
Copy link

hlf2016 commented Sep 25, 2024

Describe the bug
When there is a Input on the Dialog ,the words in the input will over flow the container
IMG_CA39295D710B-1

While there is a Textarea on the Dialog ,the words are gonna be flashing like crazy inside the container
[

ScreenRecording_09-25-2024.11-25-18_1.MP4

](url)

To Reproduce
Input

<Dialog>
                        <DialogTrigger asChild>
                            <Button variant='ghost'>
                                <Plus className='text-primary' />
                            </Button>
                        </DialogTrigger>
                        <DialogContent className='sm:max-w-[425px]'>
                            <DialogHeader>
                                <DialogTitle>订阅地址</DialogTitle>
                            </DialogHeader>
                            <Input
                                className='w-[85vw]'
                                placeholder='写入订阅源网址,以 http 或 https 开头'
                                value={subscribeUrl}
                                onChangeText={setSubscribeUrl}
                                numberOfLines={1}
                            />
                            <DialogFooter className='mt-3'>
                                <DialogClose asChild>
                                    <Button>
                                        <Text>导入</Text>
                                    </Button>
                                </DialogClose>
                            </DialogFooter>
                        </DialogContent>
                    </Dialog>

Textarea

<Dialog>
                        <DialogTrigger asChild>
                            <Button variant='ghost'>
                                <Plus className='text-primary' />
                            </Button>
                        </DialogTrigger>
                        <DialogContent className='sm:max-w-[425px]'>
                            <DialogHeader>
                                <DialogTitle>订阅地址</DialogTitle>
                            </DialogHeader>
                            <Textarea
                                className='w-[85vw]'
                                placeholder='写入订阅源网址,以 http 或 https 开头'
                                value={subscribeUrl}
                                onChangeText={setSubscribeUrl}
                                numberOfLines={1}
                            />
                            <DialogFooter className='mt-3'>
                                <DialogClose asChild>
                                    <Button>
                                        <Text>导入</Text>
                                    </Button>
                                </DialogClose>
                            </DialogFooter>
                        </DialogContent>
                    </Dialog>

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Platform (please complete the following information):

  • Type: [eg: Browser, Simulator, Emulator, Device]
  • OS: [e.g. iOS]
  • Browser (if applies) [e.g. chrome, safari]

Additional context
Add any other context about the problem here.

@hlf2016 hlf2016 added the bug Something isn't working label Sep 25, 2024
@mrzachnugent
Copy link
Owner

Hey @hlf2016

The Textarea bug seems to be a React-Native bug with the multiline prop. (see: facebook/react-native#46850)

For the TextInput, you can remove the native:leading-[1.25] class name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants