mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 21:13:07 +00:00
116404: Fixed expandable navbar section loosing focus on expand through keyboard
(cherry picked from commit 2547b1218f
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
bb977dcd49
commit
ed27231769
@@ -84,13 +84,12 @@ export class ExpandableNavbarSectionComponent extends NavbarSectionComponent imp
|
||||
/**
|
||||
* When the mouse enters the section toggler activate the menu section
|
||||
* @param $event
|
||||
* @param isActive
|
||||
*/
|
||||
onMouseEnter($event: Event, isActive: boolean) {
|
||||
onMouseEnter($event: Event): void {
|
||||
this.isMobile$.pipe(
|
||||
first(),
|
||||
).subscribe((isMobile) => {
|
||||
if (!isMobile && !isActive && !this.mouseEntered) {
|
||||
if (!isMobile && !this.active$.value && !this.mouseEntered) {
|
||||
this.activateSection($event);
|
||||
}
|
||||
this.mouseEntered = true;
|
||||
@@ -100,13 +99,12 @@ export class ExpandableNavbarSectionComponent extends NavbarSectionComponent imp
|
||||
/**
|
||||
* When the mouse leaves the section toggler deactivate the menu section
|
||||
* @param $event
|
||||
* @param isActive
|
||||
*/
|
||||
onMouseLeave($event: Event, isActive: boolean) {
|
||||
onMouseLeave($event: Event): void {
|
||||
this.isMobile$.pipe(
|
||||
first(),
|
||||
).subscribe((isMobile) => {
|
||||
if (!isMobile && isActive && this.mouseEntered) {
|
||||
if (!isMobile && this.active$.value && this.mouseEntered) {
|
||||
this.deactivateSection($event);
|
||||
}
|
||||
this.mouseEntered = false;
|
||||
|
Reference in New Issue
Block a user