-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Good morning,
I have a Window, which ultimately houses multiple comboboxes. The issue that i am running into is that whenever opening the dropdown of a combobox, the dropdown DOM element is not attached as a child to the combobox (even though before opening it, it was) and is attached as a child to the body of desktop.
This issue means that whenever i scroll, the dropdown element also scrolls with the page instead of staying fixed in place. (since it's either fixed, or has absolute position relative to the body of the page)
Link to images (opens Imgur) https://imgur.com/a/TRvr6Bz
If your window is scrollable e.g. <window contentStyle="overflow:auto">
, then by default, the popup, error box popup will not move by scrolling inside a window (keep at the fixed position).
But if you scroll the whole page, the popup still moves with scrolling. I can't tell which case is yours from your screenshot. (I have grant you uploading)
If you want the popup moves by scrolling inside a window, please add ca:data-scrollable="true"
, please refer to https://www.zkoss.org/wiki/ZUML%20Reference/ZUML/Namespaces/Client%20Attribute/Data-Scrollable
Hi!
Thanks for the answer. I had a look yesterday and the situation is a bit different than what i initially explained. We do not use the ZK version of a window but instead we rely on CSS and create our own "window" based on a DIV element. This means I don't have direct access to the ca:data-scrollable="tre"
. Changing the whole layout in the favour of a ZK based one is too extensive for this. I unfortunately can't upload a video to demonstrate the issue but i will once again add a link to the video.
As you can see in the video, the combobox component already has a popup div attached to it that is set to display:none
and has no children. When opening the combobox, the div gets automatically moved by ZK to the body of the DOM.
the popup is hidden at first. when poping up, zk keeps updating the popup's position upon onScroll event with ca:data-scrollable="true"
.
If it's under a HTML <div>
, there is no such a feature.
But I have created a feature request https://tracker.zkoss.org/browse/ZK-4894
Asked: 2021-05-04 17:14:11 +0800
Seen: 13 times
Last updated: May 06 '21
[ZK8.6 Preview] New media components coming soon!
Bug in Datebox with lenient=false and value 01.04.1981?
javascript cannot catch id of zul component. Please help.
failed to utilize getTop(), getLeft() on div(component). Please help.
Serving zul files from a directory outside web application
Which ZK version are you with?
jeanher ( 2021-05-04 18:49:02 +0800 )editCurrently on version 8.0.2.2 but also testing with version 9
AndreiArdei ( 2021-05-04 22:14:14 +0800 )edit