UX: Fix styling for focused row (#26698)

This commit is contained in:
Penar Musaraj 2024-04-22 13:17:00 -04:00 committed by GitHub
parent b971efed8c
commit 30e3f291f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 10 deletions

View File

@ -367,14 +367,14 @@ export default Component.extend({
@bind
_onTitleFocus() {
if (this.element && !this.isDestroying && !this.isDestroyed) {
this._mainLinkElement().classList.add("focused");
this.element.classList.add("selected");
}
},
@bind
_onTitleBlur() {
if (this.element && !this.isDestroying && !this.isDestroyed) {
this._mainLinkElement().classList.remove("focused");
this.element.classList.remove("selected");
}
},
@ -382,10 +382,6 @@ export default Component.extend({
return this.site.desktopView && this.focusLastVisitedTopic;
},
_mainLinkElement() {
return this.element.querySelector(".main-link");
},
_titleElement() {
return this.element.querySelector(".main-link .title");
},

View File

@ -246,10 +246,8 @@
pointer-events: none;
}
&.focused {
box-shadow: inset 3px 0 0 var(--tertiary);
}
/* we have a custom focus indicator so we can remove the native one */
// we have a custom focus indicator via .selected
// we can remove the native one
.title:focus {
outline: none;
}