fix next and prev buttons unavailable in expose view of links tab because links moved into shadow root

regarding ticket #99991

(cherry picked from commit db3c858669)
This commit is contained in:
milan 2024-10-30 11:27:55 +01:00
parent 58b3ea3b57
commit 1ac3abc9c3

View File

@ -507,7 +507,11 @@ export function ExposeMixin<B extends Constructor<LitElement>>(superclass : B)
// Try for all exposable of the same type in the parent widget
try
{
const others = (this.getParent().closest("[exposable]") || this.getParent().getDOMNode()).querySelectorAll(this.localName);
let others = (this.getParent().closest("[exposable]") || this.getParent().getDOMNode()).querySelectorAll(this.localName);
//might be in elements shadow root e.g. Links in LinksTab of edit windows
if(!others || others.length === 0){
others = this.getParent().getDOMNode().shadowRoot.querySelectorAll(this.localName)
}
others.forEach((exposable, index) =>
{
if(exposable === this)