freegroup / draw2d

Create Visio like drawings, diagrams or workflows with JavaScript and HTML5
https://freegroup.github.io/draw2d/#/examples
MIT License
734 stars 226 forks source link

Clicking on draw2d canvas doesn't take focus away from inputs #242

Open 28raining opened 1 year ago

28raining commented 1 year ago

Because of this code

if (!target.is("input") && !target.is("textarea")) {

if a text input is clicked and THEN canvas is clicked, keyup and keydown (for example delete) don't do anything.

Somehow if the canvas is clicked it needs to steal back focus from any selected input / radio button etc.

I couldn't figure it out so locally I commented that code