@exmg/exm-navigation 1.1.26 → 1.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,12 +46,10 @@ export class ExmNavigationBase extends MediaQueries(ExmgElement) {
46
46
  */
47
47
  this.navigationHasSubmenu = {};
48
48
  /**
49
- * Listen to popState changes. When the event has a state, the browser navigation buttons have been used and we have to update the path
49
+ * Listen to popState changes.
50
50
  */
51
- window.addEventListener('popstate', (event) => {
52
- if (event.state) {
53
- this.setPath();
54
- }
51
+ window.addEventListener('popstate', () => {
52
+ this.setPath();
55
53
  });
56
54
  }
57
55
  /**
@@ -4,6 +4,9 @@ export declare class ExmNavigationDrawerBase extends ExmgElement {
4
4
  persistent: boolean;
5
5
  drawer?: HTMLDivElement;
6
6
  static styles: import("lit").CSSResult[];
7
+ connectedCallback(): void;
8
+ disconnectedCallback(): void;
9
+ private handleWindowMouseOut;
7
10
  private handleMouseEnter;
8
11
  private handleMouseLeave;
9
12
  protected firstUpdated(): Promise<void>;
@@ -9,6 +9,19 @@ export class ExmNavigationDrawerBase extends ExmgElement {
9
9
  super(...arguments);
10
10
  this.open = false;
11
11
  this.persistent = false;
12
+ this.handleWindowMouseOut = (e) => {
13
+ if (!e.relatedTarget) {
14
+ this.handleMouseLeave();
15
+ }
16
+ };
17
+ }
18
+ connectedCallback() {
19
+ super.connectedCallback();
20
+ window.addEventListener('mouseout', this.handleWindowMouseOut);
21
+ }
22
+ disconnectedCallback() {
23
+ window.removeEventListener('mouseout', this.handleWindowMouseOut);
24
+ super.disconnectedCallback();
12
25
  }
13
26
  handleMouseEnter() {
14
27
  this.fire('drawer-mouseenter');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exmg/exm-navigation",
3
- "version": "1.1.26",
3
+ "version": "1.1.28",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "1a0a7807fcc13c157c95509b5efc28ef532334ec"
50
+ "gitHead": "c3d02f7e6fb8a3156b81c700e00ee9b28e3ba000"
51
51
  }