mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
弹框是应该让之前的按钮失去焦点, 否则按 enter 还会弹出
This commit is contained in:
parent
6db5eb1de9
commit
07437ec5e8
@ -77,6 +77,7 @@ export class Drawer extends React.Component<DrawerProps, DrawerState> {
|
||||
};
|
||||
handleExited = () => {
|
||||
const onExited = this.props.onExited;
|
||||
document.activeElement && (document.activeElement as HTMLElement).blur();
|
||||
onExited && onExited();
|
||||
setTimeout(() => {
|
||||
document.querySelector('.amis-dialog-widget') || document.body.classList.remove(`is-modalOpened`);
|
||||
|
@ -216,6 +216,7 @@ export default class Dialog extends React.Component<DialogProps, DialogState> {
|
||||
this.setState({
|
||||
entered: true,
|
||||
});
|
||||
document.activeElement && (document.activeElement as HTMLElement).blur();
|
||||
}
|
||||
|
||||
handleExited() {
|
||||
|
Loading…
Reference in New Issue
Block a user