Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Can't input characters in input fields in the player #10

Closed
florentpoujol opened this issue Jan 9, 2016 · 4 comments
Closed

Can't input characters in input fields in the player #10

florentpoujol opened this issue Jan 9, 2016 · 4 comments
Labels

Comments

@florentpoujol
Copy link
Contributor

Since a few versions back, you can't anymore input characters (letters, signs, numbers) in HTML input fields in the player.

Happens for any kind of inputs fields as well as for textareas.
Happens in the browser (Chrome) and the app.
All other kind of inputs works : enter, backscape, delete, tab keys, mouse clicks...
You can also copy/paste character from/to the field.

It works in the "web" system, so that's why I post this as an issue for supGame.

@elisee
Copy link
Contributor

elisee commented Jan 9, 2016

The culprit is probably this: https://github.com/superpowers/superpowers-game/blob/master/SupRuntime/src/index.ts#L61. It is necessary to avoid things like the parent document scrolling when a game is embedded in an iframe.

Maybe event.stopPropagation() is enough and would fix the issue. Can you give it a shot?

@elisee elisee added the bug label Jan 10, 2016
@florentpoujol
Copy link
Contributor Author

Will do this week-end.

@florentpoujol
Copy link
Contributor Author

stopPropagation() does the trick this but how can I test the scroll thing ?

I tried different things with Itch.io but was never able to scroll the parent document with any key press, even with the code in question completely commented.

@elisee
Copy link
Contributor

elisee commented Jan 18, 2016

@florentpoujol Hmm... Well, let's go for stopPropagation() then and we'll find out soon enough if it breaks something!

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

No branches or pull requests

2 participants