FIX: Missing glimmer topic list focus actions on mobile (#29421)

This commit is contained in:
Akshay Birajdar 2024-10-29 15:56:05 +05:30 committed by GitHub
parent a236e368e4
commit a1c9486e3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -40,12 +40,12 @@ export default class TopicCell extends Component {
@action
onTitleFocus(event) {
event.target.classList.add("selected");
event.target.closest(".topic-list-item").classList.add("selected");
}
@action
onTitleBlur(event) {
event.target.classList.remove("selected");
event.target.closest(".topic-list-item").classList.remove("selected");
}
<template>

View File

@ -93,6 +93,16 @@ export default class TopicListItem extends Component {
element.classList.add("highlighted");
}
@action
onTitleFocus(event) {
event.target.closest(".topic-list-item").classList.add("selected");
}
@action
onTitleBlur(event) {
event.target.closest(".topic-list-item").classList.remove("selected");
}
@action
applyTitleDecorators(element) {
const rawTopicLink = element.querySelector(".raw-topic-link");