Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textarea event bug in Flash target #44

Open
turdparty opened this issue Aug 27, 2019 · 1 comment
Open

Textarea event bug in Flash target #44

turdparty opened this issue Aug 27, 2019 · 1 comment

Comments

@turdparty
Copy link

Current Behavior

When you click on the scrollbar-thumb to scroll the text in a textarea the following error occurs for the flash target. (Not an issue for the android target.)

Error #1034: Type Coercion failed: cannot convert haxe.ui.events::FocusEvent@6e608d1 to haxe.ui.events.MouseEvent.

haxe.ui.util::EventMap/invoke at ...\haxe\lib\haxeui-core\git\haxe\ui\util\EventMap.hx:70
haxe.ui.core::ComponentEvents/dispatch at ...\haxe\lib\haxeui-core\git\haxe\ui\core\ComponentEvents.hx:92
haxe.ui.core::InteractiveComponent/set_focus at ...\haxe\lib\haxeui-core\git\haxe\ui\core\InteractiveComponent.hx:49
haxe.ui.components._TextArea::Events/onMouseDown at ...\haxe\lib\haxeui-core\git\haxe\ui\components\TextArea.hx:300
haxe.ui.util::EventMap/invoke at ...\haxe\lib\haxeui-core\git\haxe\ui\util\EventMap.hx:70
haxe.ui.core::ComponentEvents/dispatch at ...\haxe\lib\haxeui-core\git\haxe\ui\core\ComponentEvents.hx:92
haxe.ui.core::ComponentEvents/_onMappedEvent at ...\haxe\lib\haxeui-core\git\haxe\ui\core\ComponentEvents.hx:101
haxe.ui.backend::ComponentImpl/__onMouseEvent at ...\haxe\lib\haxeui-openfl\git\haxe\ui\backend\ComponentImpl.hx:273

Steps to Reproduce (for bugs)

  1. Just take the most basic haxeui example and add a textarea.

<vbox> <label id="label1" text="Simple HaxeUI application" /> <button text="Click me!" onClick=" label1.text='Button clicked!' " /> <textarea text="1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n"/> </vbox>

`import haxe.ui.Toolkit;
import haxe.ui.HaxeUIApp;
import haxe.ui.core.Screen;
import haxe.ui.core.Component;
import haxe.ui.macros.ComponentMacros;

class Main {
public static function main() {
Toolkit.init();
var app = new HaxeUIApp();
app.ready(function() {
var main:Component = ComponentMacros.buildComponent("Assets/UI.xml");
app.addComponent(main);
app.start();
});
}
}
`

@drondulet
Copy link

drondulet commented Mar 9, 2020

Same problem on HashLink backend, simple click on textarea leads to crash. Neko/CPP is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants