Skip to content

Commit

Permalink
fix: issue #8292 MessageBox Customization error focus
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhanMing committed Jun 17, 2022
1 parent 4ac10cf commit b9d7bd4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/components/message-box/src/index.vue
Expand Up @@ -335,7 +335,11 @@ export default defineComponent({
() => visible.value,
(val) => {
if (val) {
if (props.boxType === 'alert' || props.boxType === 'confirm') {
if (
props.boxType === '' ||
props.boxType === 'alert' ||
props.boxType === 'confirm'
) {
focusStartRef.value = confirmRef.value?.$el ?? rootRef.value
}
state.zIndex = nextZIndex()
Expand Down

0 comments on commit b9d7bd4

Please sign in to comment.