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 2026/06/15 11:25:27 UTC

(myfaces-tobago) branch main updated (18409e8b01 -> 6044c55dc4)

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

henningn pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


    from 18409e8b01 refactor(behavior): new naming rules for ClientBehavior
     new e9ae81772c feature(dropdown): JavaScript events as behavior
     new 6044c55dc4 build(theme): rebuild

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../myfaces/tobago/component/ClientBehaviors.java  |   8 ++
 .../renderkit/renderer/SuggestRenderer.java        |  29 ++++--
 .../taglib/component/ButtonTagDeclaration.java     |  17 ++--
 .../taglib/component/LinkTagDeclaration.java       |  22 +++--
 .../component/SelectManyListTagDeclaration.java    |  13 ++-
 .../component/SelectOneListTagDeclaration.java     |  14 ++-
 .../taglib/component/SuggestTagDeclaration.java    |  21 +++--
 .../dropdown/behavior}/BehaviorController.java     |  63 ++++++-------
 .../z-misc/dropdown/behavior/Behavior.xhtml        |  67 ++++++++++++++
 .../z-misc/dropdown/behavior/Behavior.test.ts      | 101 +++++++++++++++++++++
 tobago-theme/package-lock.json                     |  16 ++--
 .../tobago-theme-standard/src/main/js/faces.js     |   2 +-
 .../tobago-theme-standard/src/main/js/faces.js.map |   2 +-
 .../tobago-theme-standard/src/main/js/tobago.js    |  10 +-
 .../src/main/js/tobago.js.map                      |   2 +-
 .../src/main/ts/tobago-css.ts                      |   1 +
 .../src/main/ts/tobago-dropdown.ts                 |   4 +-
 .../src/main/ts/tobago-select-list-base.ts         |   4 +-
 .../src/main/ts/tobago-suggest.ts                  |   5 +-
 19 files changed, 309 insertions(+), 92 deletions(-)
 copy tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/{ => test/misc/dropdown/behavior}/BehaviorController.java (53%)
 create mode 100644 tobago-example/tobago-example-demo/src/main/webapp/content/900-test/z-misc/dropdown/behavior/Behavior.xhtml
 create mode 100644 tobago-example/tobago-example-demo/src/test/typescript/content/900-test/z-misc/dropdown/behavior/Behavior.test.ts


(myfaces-tobago) 02/02: build(theme): rebuild

Posted by hn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6044c55dc4f250c2fbc17e63aad2f0d70ce67efd
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Mon Jun 15 13:17:08 2026 +0200

    build(theme): rebuild
---
 tobago-theme/package-lock.json                           | 16 ++++++++--------
 tobago-theme/tobago-theme-standard/src/main/js/faces.js  |  2 +-
 .../tobago-theme-standard/src/main/js/faces.js.map       |  2 +-
 tobago-theme/tobago-theme-standard/src/main/js/tobago.js | 10 +++++-----
 .../tobago-theme-standard/src/main/js/tobago.js.map      |  2 +-
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/tobago-theme/package-lock.json b/tobago-theme/package-lock.json
index 74773bb999..8276482066 100644
--- a/tobago-theme/package-lock.json
+++ b/tobago-theme/package-lock.json
@@ -12,7 +12,7 @@
         "@trevoreyre/autocomplete-js": "3.0.3",
         "bootstrap": "5.3.8",
         "bootstrap-icons": "1.13.1",
-        "jsf.js_next_gen": "4.1.0-beta.17",
+        "jsf.js_next_gen": "4.1.0-beta.20",
         "lit-html": "3.3.3",
         "tabbable": "^6.4.0"
       },
@@ -6536,12 +6536,12 @@
       }
     },
     "node_modules/jsf.js_next_gen": {
-      "version": "4.1.0-beta.17",
-      "resolved": "https://registry.npmjs.org/jsf.js_next_gen/-/jsf.js_next_gen-4.1.0-beta.17.tgz",
-      "integrity": "sha512-26ygKAN+yDKmsn3eSg6HNaGX9NygYtetN1Y92rBq2U/79/SF5XpM/H7g4VvzhJbQ2WLRh553aUH1k/EzAl7meg==",
+      "version": "4.1.0-beta.20",
+      "resolved": "https://registry.npmjs.org/jsf.js_next_gen/-/jsf.js_next_gen-4.1.0-beta.20.tgz",
+      "integrity": "sha512-0Q4ldnQ8G8FEnZTT0/mv/TXAts+qniQsGDxLzLalA8SO+wN+LnEuHJQ0w3gmIFrPbkvHALpqSCK+K0mhVxto8g==",
       "license": "Apache-2.0",
       "dependencies": {
-        "mona-dish": "0.50.0-beta.3"
+        "mona-dish": "0.50.0-beta.6"
       }
     },
     "node_modules/json-buffer": {
@@ -7109,9 +7109,9 @@
       }
     },
     "node_modules/mona-dish": {
-      "version": "0.50.0-beta.3",
-      "resolved": "https://registry.npmjs.org/mona-dish/-/mona-dish-0.50.0-beta.3.tgz",
-      "integrity": "sha512-+A60No4/M6bDA+Cq2UkRdRvhY7NfWp2mKs4gfYzlC/HhfM5fEwzY3MHV25L5DEjiuWZV0ADSHd1XZsiukMWtsA==",
+      "version": "0.50.0-beta.6",
+      "resolved": "https://registry.npmjs.org/mona-dish/-/mona-dish-0.50.0-beta.6.tgz",
+      "integrity": "sha512-V5m21Gjx3Z0wTF78eFaMQqSMeAqnCJ5nGjo4tB5ULwbP2dLv597qNOLkZHyxvKFxy+mGXb21f5pNpMyuQGm2SA==",
       "license": "Apache-2.0",
       "dependencies": {
         "token": "^0.1.0"
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/faces.js b/tobago-theme/tobago-theme-standard/src/main/js/faces.js
index 635dcf9f0d..b16c0c325e 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/faces.js
+++ b/tobago-theme/tobago-theme-standard/src/main/js/faces.js
@@ -1,3 +1,3 @@
 /*! For license information please see faces.js.LICENSE.txt */
-(()=>{"use strict";var e={563(e,t,n){n.d(t,{J:()=>Jt,$:()=>Kt});class r extends Array{constructor(...e){super(...e),e._another?this._another=e._another:this._another=e,this.flatMap=e=>this._flatMap(e),this.flat=(e=1)=>this._flat(e)}map(e,t){return new s(...Array.prototype.map.call(this._another,e,t))}concat(...e){return new s(...Array.prototype.concat.call(this._another,...e))}reverse(){return new s(...Array.prototype.reverse.call(this._another))}slice(e,t){return new s(...Array.prototyp [...]
+(()=>{"use strict";var e={563(e,t,n){n.d(t,{J:()=>en,$:()=>tn});const r=3e4;function s(e,t){for(let n=0,s=t.length;n<s;n+=r)Array.prototype.push.apply(e,Array.prototype.slice.call(t,n,n+r));return e}class i extends Array{constructor(e=[]){super(),(e=Array.isArray(e)?e:[e])._another?this._another=e._another:this._another=e,s(this,e),this.flatMap=e=>this._flatMap(e),this.flat=(e=1)=>this._flat(e)}map(e,t){return l(Array.prototype.map.call(this._another,e,t))}concat(...e){return l(Array.pro [...]
 //# sourceMappingURL=faces.js.map
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/faces.js.map b/tobago-theme/tobago-theme-standard/src/main/js/faces.js.map
index c916e7c375..ac59afe38f 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/faces.js.map
+++ b/tobago-theme/tobago-theme-standard/src/main/js/faces.js.map
@@ -1 +1 @@
-{"version":3,"file":"faces.js","mappings":";gEASA,MAAMA,UAAyBC,MAI3B,WAAAC,IAAeC,GACXC,SAASD,GACLA,EAAgBE,SAChBC,KAAKD,SAAYF,EAAgBE,SAEjCC,KAAKD,SAAWF,EAKhBG,KAAKC,QAAWC,GAAeF,KAAKG,SAASD,GAG7CF,KAAKI,KAAO,CAACC,EAAoB,IAAML,KAAKM,MAAMD,EAE1D,CAEA,GAAAE,CAAOC,EAAwDC,GAE3D,OAAO,IAAKC,KADAf,MAAMgB,UAAUJ,IAAIK,KAAKZ,KAAKD,SAAUS,EAAYC,GAEpE,CAEA,MAAAI,IAAUC,GAEN,OAAO,IAAKJ,KADAf,MAAMgB,UAAUE,OAAOD,KAAKZ,KAAKD,YAAae,GAE9D,CAEA,OAAAC,GAEI,OAAO,IAAKL,KADAf,MAAMgB,UAAUI,QAAQH,KAAKZ,KAAKD,UAElD,CA [...]
\ No newline at end of file
+{"version":3,"file":"faces.js","mappings":";gEAWO,MAAMA,EAAiB,IAUvB,SAASC,EAAeC,EAAaC,GACxC,IAAK,IAAIC,EAAQ,EAAGC,EAAMF,EAAOG,OAAQF,EAAQC,EAAKD,GAASJ,EAC3DO,MAAMC,UAAUC,KAAKC,MAAMR,EAAQK,MAAMC,UAAUG,MAAMC,KAAKT,EAAQC,EAAOA,EAAQJ,IAEzF,OAAOE,CACX,CAOA,MAAMW,UAAyBN,MAI3B,WAAAO,CAAYC,EAAe,IACvBC,SAEAD,EAAUR,MAAMU,QAAQF,GAAWA,EAAU,CAACA,IAC1BG,SAChBC,KAAKD,SAAYH,EAAgBG,SAEjCC,KAAKD,SAAWH,EAEpBd,EAAYkB,KAAMJ,GAIdI,KAAKC,QAAWC,GAAeF,KAAKG,SAASD,GAG7CF,KAAKI,KAAO,CAACC,EAAoB,IAAML,KAAKM,MAAMD,E [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
index 62176d86c2..087504fe5e 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
+++ b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
@@ -1,20 +1,20 @@
-!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";class e{static request(e,t,s,i,n){var o;this.removeFromQueue(e,t,s);for(const n of e)if(n.element===t&&(null===(o=n.event)||void 0===o?void 0:o.type)===(null==s?void 0:s.type)&&n.inProgress&&JSON.stringify(n.executeValues)===JSON.stringify(this.getExecuteValues(t,null==i?void 0:i.execute))&&this.isSubset(n.renderIds,this.getIdSet(null==i?void 0:i.render)))return;e.push({element:t,event:s,executeValu [...]
+!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";class e{static request(e,t,s,i,n){var o;this.removeFromQueue(e,t,s);for(const n of e)if(n.element===t&&(null===(o=n.event)||void 0===o?void 0:o.type)===(null==s?void 0:s.type)&&n.inProgress&&JSON.stringify(n.executeValues)===JSON.stringify(this.getExecuteValues(t,null==i?void 0:i.execute))&&this.isSubset(n.renderIds,this.getIdSet(null==i?void 0:i.render)))return;e.push({element:t,event:s,executeValu [...]
 /*!
     * tabbable 6.4.0
     * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
-    */var g=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:n [...]
+    */var g=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:n [...]
 /*!
       * Bootstrap v5.3.8 (https://getbootstrap.com/)
       * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
       * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
       */
-const St=new Map,At={set(e,t,s){St.has(e)||St.set(e,new Map);const i=St.get(e);i.has(t)||0===i.size?i.set(t,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>St.has(e)&&St.get(e).get(t)||null,remove(e,t){if(!St.has(e))return;const s=St.get(e);s.delete(t),0===s.size&&St.delete(e)}},Ot="transitionend",xt=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),Tt= [...]
+const St=new Map,At={set(e,t,s){St.has(e)||St.set(e,new Map);const i=St.get(e);i.has(t)||0===i.size?i.set(t,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>St.has(e)&&St.get(e).get(t)||null,remove(e,t){if(!St.has(e))return;const s=St.get(e);s.delete(t),0===s.size&&St.delete(e)}},Ot="transitionend",xt=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),Tt= [...]
 /**
      * @license
      * Copyright 2017 Google LLC
      * SPDX-License-Identifier: BSD-3-Clause
      */
-const Nr=globalThis,kr=e=>e,Rr=Nr.trustedTypes,Mr=Rr?Rr.createPolicy("lit-html",{createHTML:e=>e}):void 0,Dr="$lit$",Pr=`lit$${Math.random().toFixed(9).slice(2)}$`,$r="?"+Pr,Br=`<${$r}>`,Fr=document,Hr=()=>Fr.createComment(""),qr=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Wr=Array.isArray,jr="[ \t\n\f\r]",zr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gr=/-->/g,Ur=/>/g,Vr=RegExp(`>|${jr}(?:([^\\s"'>=/]+)(${jr}*=${jr}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Yr=/'/g,X [...]
+const Nr=globalThis,kr=e=>e,Rr=Nr.trustedTypes,Mr=Rr?Rr.createPolicy("lit-html",{createHTML:e=>e}):void 0,Dr="$lit$",Pr=`lit$${Math.random().toFixed(9).slice(2)}$`,$r="?"+Pr,Br=`<${$r}>`,Hr=document,Fr=()=>Hr.createComment(""),qr=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Wr=Array.isArray,jr="[ \t\n\f\r]",zr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gr=/-->/g,Ur=/>/g,Vr=RegExp(`>|${jr}(?:([^\\s"'>=/]+)(${jr}*=${jr}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Yr=/'/g,X [...]
           ${this.iconTemplate(t)}${e}</tobago-badge>`:Jr`<tobago-badge class="badge text-bg-primary btn">
           ${this.iconTemplate(t)}${e}</tobago-badge>
   <button type='button'
@@ -22,5 +22,5 @@ const Nr=globalThis,kr=e=>e,Rr=Nr.trustedTypes,Mr=Rr?Rr.createPolicy("lit-html",
       ${i>0?" tabindex='"+String(i)+"'":""}
       @click="${this.removeBadge.bind(this)}"
       @focus="${this.focusEvent.bind(this)}"
-      @blur="${this.blurEvent.bind(this)}"><i class='bi-x-lg'></i></button>`}removeBadge(e){const t=e.target.closest(".btn-group").dataset.tobagoValue,s=this.hiddenSelect.querySelector(`[value="${t}"]`);s.selected=!1;const i=this.badges.querySelector(`[data-tobago-value="${t}"]`),n=this.getPreviousEnabledBadge(i),o=this.getNextEnabledBadge(i);n?n.querySelector("button.btn.badge").focus():o?o.querySelector("button.btn.badge").focus():(this.filterInput.disabled=!1,this.filterInput.focus()) [...]
+      @blur="${this.blurEvent.bind(this)}"><i class='bi-x-lg'></i></button>`}removeBadge(e){const t=e.target.closest(".btn-group").dataset.tobagoValue,s=this.hiddenSelect.querySelector(`[value="${t}"]`);s.selected=!1;const i=this.badges.querySelector(`[data-tobago-value="${t}"]`),n=this.getPreviousEnabledBadge(i),o=this.getNextEnabledBadge(i);n?n.querySelector("button.btn.badge").focus():o?o.querySelector("button.btn.badge").focus():(this.filterInput.disabled=!1,this.filterInput.focus()) [...]
 //# sourceMappingURL=tobago.js.map
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
index a6a7afd352..b404e6f4af 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
+++ b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago.js","sources":["../ts/tobago-ajax-queue-static.ts","../ts/tobago-ajax-queue.ts","../ts/tobago-css.ts","../ts/tobago-key.ts","../ts/tobago-client-behaviors.ts","../ts/tobago-dropdown-menu.ts","../ts/tobago-event-listener-store.ts","../ts/tobago-bar.ts","../ts/tobago-date.ts","../ts/tobago-dropdown-item-factory.ts","../ts/tobago-dropdown-item.ts","../ts/tobago-dropdown-menu-static.ts","../../../../node_modules/tabbable/dist/index.esm.js","../ts/tobago-dropdown.t [...]
\ No newline at end of file
+{"version":3,"file":"tobago.js","sources":["../ts/tobago-ajax-queue-static.ts","../ts/tobago-ajax-queue.ts","../ts/tobago-css.ts","../ts/tobago-key.ts","../ts/tobago-client-behaviors.ts","../ts/tobago-dropdown-menu.ts","../ts/tobago-event-listener-store.ts","../ts/tobago-bar.ts","../ts/tobago-date.ts","../ts/tobago-dropdown-item-factory.ts","../ts/tobago-dropdown-item.ts","../ts/tobago-dropdown-menu-static.ts","../../../../node_modules/tabbable/dist/index.esm.js","../ts/tobago-dropdown.t [...]
\ No newline at end of file


(myfaces-tobago) 01/02: feature(dropdown): JavaScript events as behavior

Posted by hn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e9ae81772c1cd8f8c6e84140951c5d943be6ebb5
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Tue Jun 9 16:05:00 2026 +0200

    feature(dropdown): JavaScript events as behavior
    
    Add test for tc:button, tc:link, tc:suggest, tc:selectOneList, tc:selectManyList
    
    "tobago.dropdown.hidden" is the default behavior for tc:suggest, because a default is mandatory.
    
    Add
      dropdownHide("tobago.dropdown.hide"),
      dropdownHidden("tobago.dropdown.hidden"),
      dropdownShow("tobago.dropdown.show"),
      dropdownShown("tobago.dropdown.shown"),
    as ClientBehavior.java values.
    
    Issue: TOBAGO-2526
---
 .../myfaces/tobago/component/ClientBehaviors.java  |   8 ++
 .../renderkit/renderer/SuggestRenderer.java        |  29 ++++--
 .../taglib/component/ButtonTagDeclaration.java     |  17 ++--
 .../taglib/component/LinkTagDeclaration.java       |  22 +++--
 .../component/SelectManyListTagDeclaration.java    |  13 ++-
 .../component/SelectOneListTagDeclaration.java     |  14 ++-
 .../taglib/component/SuggestTagDeclaration.java    |  21 +++--
 .../misc/dropdown/behavior/BehaviorController.java |  86 ++++++++++++++++++
 .../z-misc/dropdown/behavior/Behavior.xhtml        |  67 ++++++++++++++
 .../z-misc/dropdown/behavior/Behavior.test.ts      | 101 +++++++++++++++++++++
 .../src/main/ts/tobago-css.ts                      |   1 +
 .../src/main/ts/tobago-dropdown.ts                 |   4 +-
 .../src/main/ts/tobago-select-list-base.ts         |   4 +-
 .../src/main/ts/tobago-suggest.ts                  |   5 +-
 14 files changed, 350 insertions(+), 42 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java
index f4cd21e354..38d311cfc0 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java
@@ -38,6 +38,10 @@ public enum ClientBehaviors {
   reload("reload"), // tbd - may be called timeout?
   resize("resize"),
   suggest("suggest"),
+  dropdownHide("tobago.dropdown.hide"),
+  dropdownHidden("tobago.dropdown.hidden"),
+  dropdownShow("tobago.dropdown.show"),
+  dropdownShown("tobago.dropdown.shown"),
   @Deprecated(since = "6.11.1", forRemoval = true)
   rowSelectionChange("tobago.sheet.rowSelectionChange"),
   sheetRowSelectionChange("tobago.sheet.rowSelectionChange"),
@@ -81,6 +85,10 @@ public static ClientBehaviors getEnum(String value) {
   public static final String RELOAD = "reload"; // tbd - may be called timeout?
   public static final String RESIZE = "resize";
   public static final String SUGGEST = "suggest"; // tbd
+  public static final String DROPDOWN_HIDE = "tobago.dropdown.hide";
+  public static final String DROPDOWN_HIDDEN = "tobago.dropdown.hidden";
+  public static final String DROPDOWN_SHOW = "tobago.dropdown.show";
+  public static final String DROPDOWN_SHOWN = "tobago.dropdown.shown";
   public static final String SHEET_ROW_SELECTION_CHANGE = "tobago.sheet.rowSelectionChange";
   @Deprecated(since = "6.11.1", forRemoval = true)
   public static final String ROW_SELECTION_CHANGE = SHEET_ROW_SELECTION_CHANGE;
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
index 2274938d05..f4ae349ff6 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
@@ -49,22 +49,29 @@ public class SuggestRenderer<T extends AbstractUISuggest> extends RendererBase<T
 
   private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
+  private static final String BEHAVIOR_EVENT_KEY = "jakarta.faces.behavior.event";
+
   @Override
   public void decodeInternal(final FacesContext facesContext, final T component) {
     final String clientId = component.getClientId(facesContext);
     final Map<String, String> requestParameterMap = facesContext.getExternalContext().getRequestParameterMap();
     if (requestParameterMap.containsKey(clientId)) {
-      final String query = requestParameterMap.get(clientId);
-      if (LOG.isDebugEnabled()) {
-        LOG.debug("suggest query='{}'", query);
-      }
-      // XXX this is for the old way: for "suggestMethod"
-      final AbstractUIInput input = ComponentUtils.findAncestor(component, AbstractUIInput.class);
-      if (input != null) {
-        input.setSubmittedValue(query);
+      if (requestParameterMap.containsKey(BEHAVIOR_EVENT_KEY)
+          && requestParameterMap.get(BEHAVIOR_EVENT_KEY).equals("suggest")) {
+        final String query = requestParameterMap.get(clientId);
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("suggest query='{}'", query);
+        }
+        // XXX this is for the old way: for "suggestMethod"
+        final AbstractUIInput input = ComponentUtils.findAncestor(component, AbstractUIInput.class);
+        if (input != null) {
+          input.setSubmittedValue(query);
+        }
+        // this is the new way: for select items
+        component.setQuery(query);
+      } else {
+        decodeClientBehaviors(facesContext, component);
       }
-      // this is the new way: for select items
-      component.setQuery(query);
     }
   }
 
@@ -115,6 +122,8 @@ public void encodeBeginInternal(final FacesContext facesContext, final T compone
     writer.writeAttribute(HtmlAttributes.NAME, clientId, false);
     writer.endElement(HtmlElements.INPUT);
 
+    encodeBehavior(writer, facesContext, component);
+
     writer.endElement(HtmlElements.TOBAGO_SUGGEST);
   }
 
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
index 8b9d0ea792..fda440ee83 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
@@ -77,12 +77,17 @@
             name = ClientBehaviors.CLICK,
             description = "Behavior of a click event.",
             isDefault = true),
-        @Behavior(
-            name = ClientBehaviors.DBLCLICK),
-        @Behavior(
-            name = ClientBehaviors.FOCUS),
-        @Behavior(
-            name = ClientBehaviors.BLUR)
+        @Behavior(name = ClientBehaviors.DBLCLICK),
+        @Behavior(name = ClientBehaviors.FOCUS),
+        @Behavior(name = ClientBehaviors.BLUR),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDE, description = "Event is fired before a dropdown menu is hidden."
+            + " Behavior only applies if the button toggles a dropdown menu."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDDEN, description = "Event is fired after a dropdown menu is"
+            + " hidden. Behavior only applies if the button toggles a dropdown menu."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOW, description = "Event is fired before a dropdown menu is shown."
+            + " Behavior only applies if the button toggles a dropdown menu."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOWN, description = "Event is fired after a dropdown menu is shown."
+            + " Behavior only applies if the button toggles a dropdown menu.")
     },
     markups = {
         @Markup(
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
index 357eabc02b..3638967f78 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
@@ -70,16 +70,18 @@
             description = "Contains a UIOutput instance with the confirmation message.",
             allowedChildComponents = "org.apache.myfaces.tobago.Out")},
     behaviors = {
-        @Behavior(
-            name = ClientBehaviors.CLICK,
-            description = "Behavior of a click event.",
-            isDefault = true),
-        @Behavior(
-            name = ClientBehaviors.DBLCLICK),
-        @Behavior(
-            name = ClientBehaviors.FOCUS),
-        @Behavior(
-            name = ClientBehaviors.BLUR)
+        @Behavior(name = ClientBehaviors.CLICK, description = "Behavior of a click event.", isDefault = true),
+        @Behavior(name = ClientBehaviors.DBLCLICK),
+        @Behavior(name = ClientBehaviors.FOCUS),
+        @Behavior(name = ClientBehaviors.BLUR),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDE, description = "Event is fired before a dropdown menu is hidden."
+            + " Behavior only applies if the link toggles a dropdown menu."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDDEN, description = "Event is fired after a dropdown menu is"
+            + " hidden. Behavior only applies if the link toggles a dropdown menu."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOW, description = "Event is fired before a dropdown menu is shown."
+            + " Behavior only applies if the link toggles a dropdown menu."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOWN, description = "Event is fired after a dropdown menu is shown."
+            + " Behavior only applies if the link toggles a dropdown menu.")
     },
     markups = {
         @Markup(
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListTagDeclaration.java
index dc271bee5b..a7dba9544a 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListTagDeclaration.java
@@ -19,7 +19,6 @@
 
 package org.apache.myfaces.tobago.internal.taglib.component;
 
-import jakarta.faces.component.UISelectMany;
 import org.apache.myfaces.tobago.apt.annotation.Behavior;
 import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.apache.myfaces.tobago.apt.annotation.Markup;
@@ -56,6 +55,8 @@
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsRequiredForSelect;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
 
+import jakarta.faces.component.UISelectMany;
+
 /**
  * Render a multi selection option list.
  */
@@ -82,7 +83,15 @@
         @Behavior(name = ClientBehaviors.CLICK),
         @Behavior(name = ClientBehaviors.DBLCLICK),
         @Behavior(name = ClientBehaviors.FOCUS),
-        @Behavior(name = ClientBehaviors.BLUR)
+        @Behavior(name = ClientBehaviors.BLUR),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDE, description = "Event is fired before a dropdown menu is hidden."
+            + " Behavior only applies if list is not expanded."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDDEN, description = "Event is fired after a dropdown menu is"
+            + " hidden. Behavior only applies if list is not expanded."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOW, description = "Event is fired before a dropdown menu is shown."
+            + " Behavior only applies if list is not expanded."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOWN, description = "Event is fired after a dropdown menu is shown."
+            + " Behavior only applies if list is not expanded.")
     },
     markups = {
         @Markup(
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListTagDeclaration.java
index 4c9d93c0a7..6a7daebdb5 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListTagDeclaration.java
@@ -19,7 +19,6 @@
 
 package org.apache.myfaces.tobago.internal.taglib.component;
 
-import jakarta.faces.component.UISelectMany;
 import org.apache.myfaces.tobago.apt.annotation.Behavior;
 import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.apache.myfaces.tobago.apt.annotation.Markup;
@@ -57,6 +56,8 @@
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsRequiredForSelect;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
 
+import jakarta.faces.component.UISelectMany;
+
 /**
  * Render a single selection option list.
  */
@@ -83,7 +84,16 @@
         @Behavior(name = ClientBehaviors.CLICK),
         @Behavior(name = ClientBehaviors.DBLCLICK),
         @Behavior(name = ClientBehaviors.FOCUS),
-        @Behavior(name = ClientBehaviors.BLUR)},
+        @Behavior(name = ClientBehaviors.BLUR),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDE, description = "Event is fired before a dropdown menu is hidden."
+            + " Behavior only applies if list is not expanded."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDDEN, description = "Event is fired after a dropdown menu is"
+            + " hidden. Behavior only applies if list is not expanded."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOW, description = "Event is fired before a dropdown menu is shown."
+            + " Behavior only applies if list is not expanded."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOWN, description = "Event is fired after a dropdown menu is shown."
+            + " Behavior only applies if list is not expanded.")
+    },
     markups = {
         @Markup(
             name = org.apache.myfaces.tobago.context.Markup.STRING_LARGE,
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java
index 5f3bc02599..e1116cb155 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java
@@ -19,16 +19,19 @@
 
 package org.apache.myfaces.tobago.internal.taglib.component;
 
-import jakarta.faces.component.UIInput;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLocalMenu;
 import org.apache.myfaces.tobago.model.SuggestFilter;
 
+import jakarta.faces.component.UIInput;
+
 /**
  * Renders a list of suggested texts for a given input field.
  *
@@ -51,12 +54,18 @@
     allowedChildComponents = {
         "org.apache.myfaces.tobago.SelectItems",
         "org.apache.myfaces.tobago.SelectItem"
-    }/* todo ,
+    },
     behaviors = {
-        @Behavior(
-            name = ClientBehaviors.SUGGEST,
-            isDefault = true)
-    }*/)
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDE, description = "Event is fired before a dropdown menu is hidden."
+            + " Behavior only applies if the button toggles a dropdown menu."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_HIDDEN, description = "Event is fired after a dropdown menu is"
+            + " hidden. Behavior only applies if the button toggles a dropdown menu.",
+            isDefault = true),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOW, description = "Event is fired before a dropdown menu is shown."
+            + " Behavior only applies if the button toggles a dropdown menu."),
+        @Behavior(name = ClientBehaviors.DROPDOWN_SHOWN, description = "Event is fired after a dropdown menu is shown."
+            + " Behavior only applies if the button toggles a dropdown menu.")
+    })
 public interface SuggestTagDeclaration extends HasIdBindingAndRendered, HasLocalMenu {
 
   /**
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/test/misc/dropdown/behavior/BehaviorController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/test/misc/dropdown/behavior/BehaviorController.java
new file mode 100644
index 0000000000..36d31e6846
--- /dev/null
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/test/misc/dropdown/behavior/BehaviorController.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.tobago.example.demo.test.misc.dropdown.behavior;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import jakarta.enterprise.context.SessionScoped;
+import jakarta.faces.event.AjaxBehaviorEvent;
+import jakarta.inject.Named;
+import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
+
+@SessionScoped
+@Named(value = "testBehaviorController")
+public class BehaviorController implements Serializable {
+
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+  private int button = 0;
+  private int link = 0;
+  private int suggest = 0;
+  private int selectOneList = 0;
+  private int selectManyList = 0;
+
+  public void reset() {
+    suggest = 0;
+  }
+
+  public void increaseButton(final AjaxBehaviorEvent event) {
+    button++;
+  }
+
+  public void increaseLink(final AjaxBehaviorEvent event) {
+    link++;
+  }
+
+  public void increaseSuggest(final AjaxBehaviorEvent event) {
+    suggest++;
+  }
+
+  public void increaseSelectOneList(final AjaxBehaviorEvent event) {
+    selectOneList++;
+  }
+
+  public void increaseSelectManyList(final AjaxBehaviorEvent event) {
+    selectManyList++;
+  }
+
+  public int getButton() {
+    return button;
+  }
+
+  public int getLink() {
+    return link;
+  }
+
+  public int getSuggest() {
+    return suggest;
+  }
+
+  public int getSelectOneList() {
+    return selectOneList;
+  }
+
+  public int getSelectManyList() {
+    return selectManyList;
+  }
+}
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/z-misc/dropdown/behavior/Behavior.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/z-misc/dropdown/behavior/Behavior.xhtml
new file mode 100644
index 0000000000..8561194a07
--- /dev/null
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/z-misc/dropdown/behavior/Behavior.xhtml
@@ -0,0 +1,67 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<ui:composition template="/main.xhtml"
+                xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:f="jakarta.faces.core"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="jakarta.faces.facelets">
+
+  <tc:panel id="counter">
+    <p>Counter</p>
+    <tc:flexLayout columns="auto">
+      <tc:out id="buttonCounter" label="button" value="#{testBehaviorController.button}" labelLayout="top"/>
+      <tc:out id="linkCounter" label="link" value="#{testBehaviorController.link}" labelLayout="top"/>
+      <tc:out id="suggestCounter" label="suggest" value="#{testBehaviorController.suggest}" labelLayout="top"/>
+      <tc:out id="selectOneListCounter" label="selectOneList" value="#{testBehaviorController.selectOneList}"
+              labelLayout="top"/>
+      <tc:out id="selectManyListCounter" label="selectManyList" value="#{testBehaviorController.selectManyList}"
+              labelLayout="top"/>
+    </tc:flexLayout>
+  </tc:panel>
+
+  <tc:button id="button" label="Dropdown menu" omit="true">
+    <f:ajax event="tobago.dropdown.hidden" render="counter" listener="#{testBehaviorController.increaseButton}"/>
+    <tc:link label="Entry" omit="true"/>
+  </tc:button>
+
+  <tc:link id="link" label="Dropdown menu" omit="true">
+    <f:ajax event="tobago.dropdown.hidden" render="counter" listener="#{testBehaviorController.increaseLink}"/>
+    <tc:link label="Entry" omit="true"/>
+  </tc:link>
+
+  <tc:in id="suggestInput" label="Suggest">
+    <tc:suggest id="suggest" query="#{suggestController.query}">
+      <f:ajax event="tobago.dropdown.hidden" render="counter" listener="#{testBehaviorController.increaseSuggest}"/>
+      <tc:selectItems value="#{suggestController.solarObjects}" var="name" itemValue="#{name}"/>
+    </tc:suggest>
+  </tc:in>
+
+  <tc:selectOneList id="selectOneList" value="#{selectOneListController.selectedPlanet}">
+    <f:ajax event="tobago.dropdown.hidden" render="counter" listener="#{testBehaviorController.increaseSelectOneList}"/>
+    <tc:selectItems value="#{selectOneListController.planets}" var="planet"
+                    itemLabel="#{planet.name}" itemValue="#{planet}"/>
+  </tc:selectOneList>
+
+  <tc:selectManyList id="selectManyList" value="#{selectManyListController.selectedPlanets}">
+    <f:ajax event="tobago.dropdown.hidden" render="counter"
+            listener="#{testBehaviorController.increaseSelectManyList}"/>
+    <tc:selectItems value="#{selectManyListController.planets}" var="planet"
+                    itemLabel="#{planet.name}" itemValue="#{planet}"/>
+  </tc:selectManyList>
+
+</ui:composition>
diff --git a/tobago-example/tobago-example-demo/src/test/typescript/content/900-test/z-misc/dropdown/behavior/Behavior.test.ts b/tobago-example/tobago-example-demo/src/test/typescript/content/900-test/z-misc/dropdown/behavior/Behavior.test.ts
new file mode 100644
index 0000000000..7a830093c8
--- /dev/null
+++ b/tobago-example/tobago-example-demo/src/test/typescript/content/900-test/z-misc/dropdown/behavior/Behavior.test.ts
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {expect, test} from "@playwright/test";
+
+test.describe("900-test/z-misc/dropdown/behavior/Behavior.xhtml", () => {
+
+  test.beforeEach(async ({page}) => {
+    await page.goto("/content/900-test/z-misc/dropdown/behavior/Behavior.xhtml");
+  });
+
+  test("Open and close every dropdown menu", async ({page}) => {
+    const buttonCounter = page.locator("tobago-out[id='page:mainForm:buttonCounter'] .form-control-plaintext");
+    const button = page.locator("[id='page:mainForm:button::command']");
+    const buttonDropdownMenu = page.locator(".tobago-dropdown-menu[data-tobago-for='page:mainForm:button']");
+    await expect(buttonDropdownMenu).not.toContainClass("show");
+    await expect(buttonDropdownMenu).not.toBeVisible();
+    await button.click();
+    await expect(buttonDropdownMenu).toContainClass("show");
+    await expect(buttonDropdownMenu).toBeVisible();
+    await expect(buttonCounter).toHaveText("0");
+    await page.keyboard.press("Escape");
+    await expect(buttonDropdownMenu).not.toContainClass("show");
+    await expect(buttonDropdownMenu).not.toBeVisible();
+    await expect(buttonCounter).toHaveText("1");
+
+    const linkCounter = page.locator("tobago-out[id='page:mainForm:linkCounter'] .form-control-plaintext");
+    const link = page.locator("[id='page:mainForm:link::command']");
+    const linkDropdownMenu = page.locator(".tobago-dropdown-menu[data-tobago-for='page:mainForm:link']");
+    await expect(linkDropdownMenu).not.toContainClass("show");
+    await expect(linkDropdownMenu).not.toBeVisible();
+    await link.click();
+    await expect(linkDropdownMenu).toContainClass("show");
+    await expect(linkDropdownMenu).toBeVisible();
+    await expect(linkCounter).toHaveText("0");
+    await page.keyboard.press("Escape");
+    await expect(linkDropdownMenu).not.toContainClass("show");
+    await expect(linkDropdownMenu).not.toBeVisible();
+    await expect(linkCounter).toHaveText("1");
+
+    const suggestCounter = page.locator("tobago-out[id='page:mainForm:suggestCounter'] .form-control-plaintext");
+    const suggestInputField = page.locator("[id='page:mainForm:suggestInput::field']");
+    const suggestDropdownMenu = page.locator(".tobago-dropdown-menu[data-tobago-for='page:mainForm:suggest']");
+    await page.keyboard.press("Tab");
+    await expect(suggestInputField).toBeFocused();
+    await expect(suggestDropdownMenu).not.toContainClass("show");
+    await expect(suggestDropdownMenu).not.toBeVisible();
+    await page.keyboard.press("x");
+    await expect(suggestDropdownMenu).toContainClass("show");
+    await expect(suggestDropdownMenu).toBeVisible();
+    await expect(suggestCounter).toHaveText("0");
+    await page.keyboard.press("Escape");
+    await expect(suggestDropdownMenu).not.toContainClass("show");
+    await expect(suggestDropdownMenu).not.toBeVisible();
+    await expect(suggestCounter).toHaveText("1");
+
+    const selectOneListCounter = page.locator("tobago-out[id='page:mainForm:selectOneListCounter'] .form-control-plaintext");
+    const selectOneListField = page.locator(".tobago-select-field[id='page:mainForm:selectOneList::selectField']");
+    const selectOneListDropdownMenu = page.locator(".tobago-dropdown-menu[data-tobago-for='page:mainForm:selectOneList']");
+    await expect(selectOneListDropdownMenu).not.toContainClass("show");
+    await expect(selectOneListDropdownMenu).not.toBeVisible();
+    await selectOneListField.click();
+    await expect(selectOneListDropdownMenu).toContainClass("show");
+    await expect(selectOneListDropdownMenu).toBeVisible();
+    await expect(selectOneListCounter).toHaveText("0");
+    await page.keyboard.press("Escape");
+    await expect(selectOneListDropdownMenu).not.toContainClass("show");
+    await expect(selectOneListDropdownMenu).not.toBeVisible();
+    await expect(selectOneListCounter).toHaveText("1");
+
+    const selectManyListCounter = page.locator("tobago-out[id='page:mainForm:selectManyListCounter'] .form-control-plaintext");
+    const selectManyListField = page.locator(".tobago-select-field[id='page:mainForm:selectManyList::selectField']");
+    const selectManyListDropdownMenu = page.locator(".tobago-dropdown-menu[data-tobago-for='page:mainForm:selectManyList']");
+    await expect(selectManyListDropdownMenu).not.toContainClass("show");
+    await expect(selectManyListDropdownMenu).not.toBeVisible();
+    await selectManyListField.click();
+    await expect(selectManyListDropdownMenu).toContainClass("show");
+    await expect(selectManyListDropdownMenu).toBeVisible();
+    await expect(selectManyListCounter).toHaveText("0");
+    await page.keyboard.press("Escape");
+    await expect(selectManyListDropdownMenu).not.toContainClass("show");
+    await expect(selectManyListDropdownMenu).not.toBeVisible();
+    await expect(selectManyListCounter).toHaveText("1");
+  });
+});
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-css.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-css.ts
index a2dcd56160..2d868a93db 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-css.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-css.ts
@@ -30,6 +30,7 @@ export enum Css {
   DROPDOWN_ITEM = "dropdown-item",
   DROPDOWN_MENU = "dropdown-menu",
   DROPDOWN_MENU_END = "dropdown-menu-end",
+  DROPDOWN_TOGGLE = "dropdown-toggle",
   END_0 = "end-0",
   FADE = "fade",
   FIXED_BOTTOM = "fixed-bottom",
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-dropdown.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-dropdown.ts
index 4e1eb106f3..890a445c2c 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-dropdown.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-dropdown.ts
@@ -34,8 +34,8 @@ class Dropdown extends HTMLElement {
 
   connectedCallback(): void {
     if (!this.classList.contains(Css.TOBAGO_DROPDOWN_SUBMENU)) { // ignore submenus
-      this.dropdownMenu = new DropdownMenu(this.dropdownMenuElement, this.toggle, this, this.insideNavbar(),
-          this.dropdownMenuElement.classList.contains(Css.DROPDOWN_MENU_END)
+      this.dropdownMenu = new DropdownMenu(this.dropdownMenuElement, this.toggle, [this, this.toggle],
+          this.insideNavbar(), this.dropdownMenuElement.classList.contains(Css.DROPDOWN_MENU_END)
               ? DropdownMenuAlignment.end : DropdownMenuAlignment.start);
       this.listeners.add(document, "click", this.globalClickEvent.bind(this));
       this.listeners.add(this.toggle, "keydown", this.toggleButtonKeydownEvent.bind(this));
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-select-list-base.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-select-list-base.ts
index 45fef38db2..97035abb3c 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-select-list-base.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-select-list-base.ts
@@ -38,8 +38,8 @@ export abstract class SelectListBase extends HTMLElement {
   connectedCallback(): void {
     this.optionsControls = new OptionsControls(this.options, this.select.bind(this));
     if (this.dropdownMenuElement) {
-      this.dropdownMenu = new DropdownMenu(this.dropdownMenuElement, this.selectField, this, this.localMenu,
-          DropdownMenuAlignment.centerFullWidth);
+      this.dropdownMenu = new DropdownMenu(this.dropdownMenuElement, this.selectField, [this, this.hiddenSelect],
+          this.localMenu, DropdownMenuAlignment.centerFullWidth);
     }
     this.listeners.add(document, "click", this.globalClickEvent.bind(this));
     this.listeners.add(this.hiddenSelect, "click", this.labelClickEvent.bind(this));
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-suggest.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-suggest.ts
index f225db41c1..41260537b9 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-suggest.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-suggest.ts
@@ -57,8 +57,8 @@ export class Suggest {
     /* eslint-enable max-len */
     this.optionsControls = new OptionsControls(this.optionsElement, this.select.bind(this));
 
-    this.dropdownMenu = new DropdownMenu(this.dropdownMenuElement, this.inputField, this.tobagoIn, this.localMenu,
-        DropdownMenuAlignment.centerFullWidth);
+    this.dropdownMenu = new DropdownMenu(this.dropdownMenuElement, this.inputField, [this.tobagoIn, this.tobagoSuggest],
+        this.localMenu, DropdownMenuAlignment.centerFullWidth);
 
     this.inputField.role = "combobox";
     this.inputField.autocomplete = "off";
@@ -239,6 +239,7 @@ export class Suggest {
 
   private ajaxEvent(event: faces.AjaxEvent): void {
     if (event.status === "success") {
+      this.dropdownMenu.updateEventElements([this.tobagoIn, this.tobagoSuggest]);
       this.optionsControls.renderRows(this.items);
       this.spinner.hide();