This is an automated email from the ASF dual-hosted git repository.
yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 6a7197f Make sure popup actually gets the set width by first
resetting its explicit width.
6a7197f is described below
commit 6a7197f242a56af711fe5e3ed67541dddbe29340
Author: Yishay Weiss <[email protected]>
AuthorDate: Tue Jan 11 14:47:22 2022 +0200
Make sure popup actually gets the set width by first resetting its
explicit width.
This is necessary because ScrollingViewport sets its width to 100% after
explicit width was already set. It could be that ScrollingViewport
should reset the explicit width, but I have not considered the general
case.
---
.../spark/components/beads/controllers/DropDownListController.as | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/controllers/DropDownListController.as
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/controllers/DropDownListController.as
index 5251f4c..5e8b881 100644
---
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/controllers/DropDownListController.as
+++
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/controllers/DropDownListController.as
@@ -77,7 +77,8 @@ public class DropDownListController implements IBead,
IBeadController
var popup:UIComponent = viewBead.popUp as UIComponent;
var selectionModel:ISelectionModel = host.model as ISelectionModel;
var popUpModel:ISelectionModel = popup.model as ISelectionModel;
- popup.width = host.width;
+ popup.width = NaN;
+ popup.setActualSize(host.width, popup.height);
popUpModel.dataProvider = selectionModel.dataProvider;
popUpModel.labelField = selectionModel.labelField;// adds to display
list as well
popUpModel.selectedIndex = selectionModel.selectedIndex;