Skip to content

Commit

Permalink
Merge branch 'master' into carousel-focus-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Feb 12, 2021
2 parents 8ca1216 + 0de2511 commit 1b9e779
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* LICENSE file in the root directory of this source tree.
*/

import { customElement } from 'lit-element';
import { customElement, query } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
import { forEach } from '../../globals/internal/collection-helpers';
Expand All @@ -25,6 +25,12 @@ const { stablePrefix: ddsPrefix } = ddsSettings;
*/
@customElement(`${ddsPrefix}-megamenu-top-nav-menu`)
class DDSMegaMenuTopNavMenu extends DDSTopNavMenu {
/**
* The menu ul node.
*/
@query(`.${prefix}--header__menu`)
private _menuNode!: HTMLElement;

/**
* The observer for the resize of the viewport.
*/
Expand Down Expand Up @@ -71,6 +77,7 @@ class DDSMegaMenuTopNavMenu extends DDSTopNavMenu {
}

firstUpdated() {
this._menuNode.removeAttribute('role');
this._cleanAndCreateObserverResize({ create: true });
}

Expand Down

0 comments on commit 1b9e779

Please sign in to comment.