A platform for community discussion. Free, open, simple.
UX: Fix styling for focused row (#26698)
Penar Musaraj30e3f291f86e
diff --git a/app/assets/javascripts/discourse/app/components/topic-list-item.js b/app/assets/javascripts/discourse/app/components/topic-list-item.jsindex 2e8993eefff..9f0d62fbf7b 100644--- a/app/assets/javascripts/discourse/app/components/topic-list-item.js+++ b/app/assets/javascripts/discourse/app/components/topic-list-item.js@@ -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");},diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scssindex 7b9f6ab2d4f..c5aae03f951 100644--- a/app/assets/stylesheets/common/base/_topic-list.scss+++ b/app/assets/stylesheets/common/base/_topic-list.scss@@ -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;}