add focus to remove user button

This commit is contained in:
daria 2024-06-21 12:07:40 +03:00
parent f202a617d0
commit f24bbacd0b
6 changed files with 10 additions and 7 deletions

View File

@ -198,7 +198,7 @@
text-decoration: none;
}
}
.cp-usergrid-user, textarea, a {
.cp-usergrid-user, textarea, a, .fa-times {
outline: none;
&:focus {
outline: @cryptpad_color_brand solid 2px;

View File

@ -774,7 +774,7 @@
padding: 10px;
color: @toolbar-bg-color;
color: var(--toolbar-bg-color);
border-radius: 5px;
border-radius: @variables_radius;
span {
font-size: 45px;

View File

@ -115,7 +115,8 @@
}
}
.fa-times {
padding-left: 5px;
border-radius: @variables_radius;
margin-left: 5px;
cursor: pointer;
height: 100%;
line-height: 25px;

View File

@ -615,7 +615,6 @@ define([
else{
if (e.which === 9 && !insideColorButtons) {
e.preventDefault();
console.log(modalElements);
const firstElement = modalElements.first()[0];
const lastElement = modalElements.last()[0];

View File

@ -173,8 +173,11 @@ define([
var removeBtn, el;
if (config.remove) {
removeBtn = h('span.fa.fa-times');
$(removeBtn).click(function () {
config.remove(el);
$(removeBtn).attr('tabindex', '0');
$(removeBtn).on('click keydown', function(event) {
if (event.type === 'click' || (event.type === 'keydown' && event.key === 'Enter')) {
config.remove(el);
}
});
}

View File

@ -196,7 +196,7 @@
background: transparent;
align-self: flex-start;
outline-style: none;
border-radius: 5px;
border-radius: @variables_radius;
&:focus {
outline: @cryptpad_color_brand solid 2px;
}