You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2020/05/26 08:14:52 UTC

[myfaces-tobago] branch master updated: fix: dropdown inStickyHeader() function

This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new d3a6b16  fix: dropdown inStickyHeader() function
d3a6b16 is described below

commit d3a6b161ee63a926de379e5d28bdeb776eaeb463
Author: Henning Nöth <hn...@apache.org>
AuthorDate: Wed May 20 14:53:01 2020 +0200

    fix: dropdown inStickyHeader() function
---
 tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-dropdown.ts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-dropdown.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-dropdown.ts
index 0c42861..554e52c 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-dropdown.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-dropdown.ts
@@ -161,8 +161,7 @@ class Dropdown extends HTMLElement {
   }
 
   private inStickyHeader(): boolean {
-    const root = this.getRootNode() as ShadowRoot | Document;
-    return Boolean(root.querySelector("header.tobago-header.sticky-top tobago-dropdown[id='" + this.id + "']"));
+    return Boolean(this.closest("tobago-header.sticky-top"));
   }
 
   private get dropdownMenu(): HTMLDivElement {