haxeui / haxeui-hxwidgets

The hxWidgets backend of the HaxeUI framework -
http://haxeui.org
MIT License
23 stars 7 forks source link

Mouse Event doesn't work. #6

Closed aW4KeNiNG closed 3 years ago

aW4KeNiNG commented 7 years ago

The mouse down event doesn't seem to work.

Expected Behavior

It is required with InteractiveComponents, in special TextField and TextArea with placeholderText property.

Current Behavior

It doesn't dispatch the mouse event down.

Possible Solution

It could be a problem with hxWidgets. If it isn't possible to fix in hxWidgets, haxeui-hxwidgets should do it possible.

Test app / minimal test case

An example code is here https://github.com/haxeui/haxeui-core/pull/69

Steps to Reproduce (for bugs)

Press in a textfield/textarea with default text. It should dissapear.

chipshort commented 6 years ago

I experienced something similar with MOUSE_OUT. At least with Labels (strangely Buttons were working; I didn't check any others):

package;

import haxe.ui.HaxeUIApp;
import haxe.ui.core.MouseEvent;
import haxe.ui.components.*;

class Test
{
    public static function main() : Void
    {
        var app = new HaxeUIApp();
        app.ready(function () {
            var label = new Label();
            label.value = "Test";

            label.registerEvent(MouseEvent.MOUSE_OUT, function (e) {
                trace("Mouse out"); //never called
            });

            app.addComponent(label);
            app.start();
        });
    }
}