ianharrigan / haxeui

IMPORTANT NOTE! This repository is no longer maintained. Please consider the newer version: https://github.com/haxeui/haxeui-core
http://haxeui.org/
392 stars 47 forks source link

HTML5 ListSelector broken on first "open" #342

Open TheSHEEEP opened 8 years ago

TheSHEEEP commented 8 years ago

Hey,

The ListSelector is broken in the HTML5 target.

If you want to open the list for the first time, the following happens: http://i.giphy.com/l2JJtKgHEGQJsIOis.gif

Basically, you click the button, then some weird thing pops up (really, I have no idea what that is - some kind of borked scroll view?). You have to click on that thing, and then somewhere outside of it to close it. Now, from the next click on the button works normally, showing the actual list.

It is easily reproducable by just adding some ListSelector to the root and running the thing in the HTML5 target - works fine otherwise, at least on Windows native:

var sel = new ListSelector();
sel.dataSource.add({text: "One"});
sel.dataSource.add({text: "Two"});
sel.dataSource.add({text: "Three"});
p_root.addChild(sel);
ianharrigan commented 8 years ago

HI, unfortunately there are various problems with haxeui (v1) on html5 targets, and because of that its not technically supported. Pretty much all the issues revolve around scrollviews (or openfl scrollrects)

TheSHEEEP commented 8 years ago

Well, hoping for a quick v2 release, then ;)

ianharrigan commented 8 years ago

:)

Yeah, these problems simply evaporate with v2... ;)

loudoweb commented 8 years ago

I've looked into the code. It seems that at first initialization all childs of the ListView has a height equal to 0.

For now, to avoid this bug, I'm doing that :

 myListSelector.showList();
 myListSelector.hideList();
TheSHEEEP commented 8 years ago

Hm, that does seem to work somewhat, but the selector is still not clickable sometimes and many things in the HTML5 target are simply behaving weird. I guess I'll stick with other targets for the time being.