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

In quiz edit modal, when i choose to add an image, but cancel using the "ESC" key, the modal unexpectedly closes #335

Open
dlrenz opened this issue Aug 29, 2018 · 3 comments
Milestone

Comments

@dlrenz
Copy link
Member

dlrenz commented Aug 29, 2018

the image dialog should close, but not the whole modal

@RobZuazua
Copy link
Contributor

sounds like an event.stopProgogation or event.preventDefault. Did you give these a try?

@RobZuazua RobZuazua added this to the September 3 milestone Aug 30, 2018
@dlrenz
Copy link
Member Author

dlrenz commented Aug 30, 2018

Not sure about this one. I tried:

<input style={{display: "none"}} type="file" accept="image/*" onChange={this.onSelectImage} ref="fileUploader" onkeyup={function(e){if(e.keyCode===27) this.blur(),e.stopPropagation()}}/>

But that doesn't work

@frogg
Copy link
Member

frogg commented Aug 30, 2018

That could be a bug in your browser. In safari this is not a problem, because the input dialog automatically catches the ESC action.

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

3 participants