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

onCancel event #6049

Closed
tleunen opened this issue Feb 17, 2016 · 16 comments
Closed

onCancel event #6049

tleunen opened this issue Feb 17, 2016 · 16 comments

Comments

@tleunen
Copy link

tleunen commented Feb 17, 2016

I don't see the onCancel event in the list of supported events. Would it be possible to add it in the list?
It's used by the Dialog element, already available in Chrome.

@jimfb
Copy link
Contributor

jimfb commented Feb 18, 2016

I think it would need to be added to the source code too.

@tleunen
Copy link
Author

tleunen commented Feb 18, 2016

I wanted to do it, but I don't really know in which category we shoul put the close and cancel events used in the Dialog. In the UI category?

@jimfb
Copy link
Contributor

jimfb commented Feb 18, 2016

It goes into the UI category if it has the detail and view properties. Otherwise, it would probably go into its own category.

@mxstbr
Copy link
Contributor

mxstbr commented Feb 18, 2016

Here is a JSFiddle with a dialog element and the close and cancel events for reference, works on my Chrome Canary 50.0.2651.0!

@syranide
Copy link
Contributor

FYI, it's just an Event, no subcategory.

@ludvigsen
Copy link
Contributor

Tried implementing support for this here:
#6247

Please let me know it i've made any mistakes :)

@cbrwizard
Copy link

Should React support for the onClose event too? It's also related to the dialog.

@ludvigsen you were faster than me, haha, grats =]. I've created an example page (took examples/basic/index.html as source) to test out new events on gist, you can check it out and use it for easier debugging.

@ludvigsen
Copy link
Contributor

Thanks @cbrwizard! It seems like it would make a lot of sense to support the onClose event as well, I can definitely add it. Although in react I guess you would control the dialog through the "open" attribute, and therefore know when the user closed the dialog. Whereas the cancel event is fired if the user presses ESC, so the only way to know about it is to listen for it.

@tleunen
Copy link
Author

tleunen commented Mar 14, 2016

Not really, because you can open a dialog as a normal dialog, or as a modal.

Afaik, there's no way with the attribute to open it as a modal.

@ludvigsen
Copy link
Contributor

@tleunen thats true, would be nice if it was possible to control modal as well with an attribute.

@pranaygp
Copy link

pranaygp commented Sep 5, 2016

Is there still a issue here, or should this be closed?

@aweary
Copy link
Contributor

aweary commented Sep 5, 2016

@pranaygp looks like this is still an outstanding issue. #6247 was opened to add onCancel, but it wasn't reviewed. At this point it would have some conflicts that need to be resolved before it can be merged.

@pranaygp
Copy link

pranaygp commented Sep 5, 2016

@aweary thanks. I'll look into that PR and see if I can help

@ludvigsen
Copy link
Contributor

@aweary will #6247 be merged if the conflicts (and other issues if there are any) are resolved?

ludvigsen added a commit to ludvigsen/react that referenced this issue Jan 26, 2017
ludvigsen added a commit to ludvigsen/react that referenced this issue Jan 26, 2017
@paulmanta
Copy link
Contributor

I see that #6247 was merged, should this issue be closed?

@aweary
Copy link
Contributor

aweary commented May 6, 2017

It should, thank you!

@aweary aweary closed this as completed May 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants