INPUT and DIV with CONTENTEDITABLE:TRUE elements do not register Space or Arrow keys

I'm having a problem where if I have an INPUT or DIV element, the latter with contenteditable="true", neither the space or arrow keys register. Probably others, but those for sure. I've made a simple codepen to demonstrate. All it takes is the creation of a Frame and it all goes wrong. Help!

We disable certain keys to prevent the canvas from being moved. They can be enabled again in a couple ways. One is to pass allowDefault:true to the Frame call - or there is an allowDefault property. These control zil() which is short for still - to keep the canvas still. This can be manually set to decide which things to allow like scrollwheels, or keys.

By default, allowDefault is false for FIT and FILL scaling modes as this is usually only ZIM. We then turn on certain ones if there is a TextArea or TextInput for example. For FULL or tag scaling, allowDefault defaults to true as those often have more HTML around.

1 Like

Great that worked. In my case I place a splash/setup div (with text inputs) above the FIT canvas, and then hide it after setup is complete. Now I start it with "allowDefault = true" and flip it to false when I "display = none" the setup.

1 Like