Element: [bug report] open the drawer title, there will be a focus box by default

Created on 2 Dec 2019  ·  13Comments  ·  Source: ElemeFE/element

Element UI version

2.13.0

OS/Browsers version

chrome

Vue version

2.6.10

Reproduction Link

https://jsfiddle.net/r4g8esm9/

Steps to reproduce

打开 drawer 标题默认会有一个focus框

What is Expected?

打开 drawer 标题默认会有一个focus框

What is actually happening?

打开 drawer 标题默认会有一个focus框

image

Most helpful comment

.el-drawer > header > span:focus {
outline-color: white;
}
.el-drawer > header > button:focus {
outline-color: white;
}
.el-drawer > header > button:hover {
color: rgb(64, 158, 255);
}

All 13 comments

Translation of this issue:

Element UI version

2.13.0

OS/Browsers version

Chrome

Vue version

2.6.10

Reproduction Link

https://jsfiddle.net/r4g8esm9/

Steps to reproduce

When you open the drawer title, there will be a focus box by default

What is Expected?

When you open the drawer title, there will be a focus box by default

What is actually happening?

When you open the drawer title, there will be a focus box by default

image

link

this.$nextTick(() => {
  Utils.focusFirstDescendant(this.$refs.drawer);
});

发现把这一行去掉就可以了,但是不知道为什么这么写

link

this.$nextTick(() => {
  Utils.focusFirstDescendant(this.$refs.drawer);
});

发现把这一行去掉就可以了,但是不知道为什么这么写

这个提交的锅,解决了一个bug,并生成了一个新的bug。😄

link

this.$nextTick(() => {
  Utils.focusFirstDescendant(this.$refs.drawer);
});

发现把这一行去掉就可以了,但是不知道为什么这么写

这个提交的锅,解决了一个bug,并生成了一个新的bug。😄

看起来像是有a11y的需求?

.el-drawer > header > span:focus {
outline-color: white;
}
.el-drawer > header > button:focus {
outline-color: white;
}
.el-drawer > header > button:hover {
color: rgb(64, 158, 255);
}

同样遇到此问题,望修复

在github上这种没有内容的回复请在一楼用 +1表态代替 issus搜索时还能按表态数排序
回复会给所有订阅者发邮件提醒的

如果把头部隐藏了 下面有button的话 也会有同样的问题?这个时候怎么改?现在暂时前面加了input 然后设置透明了,有更好的方法吗 大佬 @qianjin1017

/deep/.el-drawer__header span:focus {pointer-events: none; outline: none !important;}
https://stackoverflow.com/questions/3397113/how-to-remove-focus-border-outline-around-text-input-boxes-chrome

@liushuiyuan001 hi, 我也遇到了相同的问题,头部隐藏了,drawer下面有button,请问你是怎么解决的?

修复了吗?

覆盖掉就行了

`

el-drawer__title > span {

outline: 0;
}
`

Duplicate of #19902

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mochenxm picture mochenxm  ·  3Comments

dbskccc picture dbskccc  ·  3Comments

yuchonghua picture yuchonghua  ·  3Comments

makunsusu picture makunsusu  ·  3Comments

yorululu picture yorululu  ·  3Comments