haxeui-openfl icon indicating copy to clipboard operation
haxeui-openfl copied to clipboard

Textarea event bug in Flash target

Open turdparty opened this issue 5 years ago • 1 comments

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(); }); } } `

turdparty avatar Aug 27 '19 16:08 turdparty

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

drondulet avatar Mar 09 '20 12:03 drondulet