-
-
Notifications
You must be signed in to change notification settings - Fork 199
fix: invalid autofocus #361
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
base: master
Are you sure you want to change the base?
Changes from 5 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import * as React from 'react'; | ||
import Portal from '@rc-component/portal'; | ||
import * as React from 'react'; | ||
import Dialog from './Dialog'; | ||
import type { IDialogPropTypes } from './IDialogPropTypes'; | ||
import { isNil } from './util'; | ||
|
||
// fix issue #10656 | ||
/* | ||
|
@@ -41,7 +42,7 @@ const DialogWrap: React.FC<IDialogPropTypes> = (props: IDialogPropTypes) => { | |
<Portal | ||
open={visible || forceRender || animatedVisible} | ||
autoDestroy={false} | ||
getContainer={getContainer} | ||
getContainer={isNil(getContainer) ? 'body' : getContainer} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not be a necessary change, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rc-potral默认的挂载点似乎不太稳定,有可能虚拟dom渲染的时候挂载点还没添加到页面,或者添加后又被移除(visible为false的情况),导致autofocus失效。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 那是不是分两个问题修复? 后者在 Portal 修复? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zombieJ 呼叫巨佬 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我也觉得这是两件事。这个 PR 应该只管 Input focus 的问题。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 也许得先优化一下 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 拉你进群了,这种需要沟通比较多的问题到群里沟通吧 |
||
autoLock={visible || animatedVisible} | ||
> | ||
<Dialog | ||
|
Uh oh!
There was an error while loading. Please reload this page.