-
Notifications
You must be signed in to change notification settings - Fork 46.5k
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
Add support for <dialog> tag. #2033
Conversation
Thanks :) I may have oversimplified just a bit in the other issue - I didn't look closely at what was involved with dialogs. How does one use a We don't have tests for our actual supported elements but for things like this it would be good to paste some sample code here (or in a gist) or just describe how you made sure this worked in React. |
Ah, I hadn't spotted the open attribute. var Credentials = React.createClass({
componentDidMount: function() {
this.getDOMNode().showModal();
},
onKeyUp: function(event) {
if (event.keyCode === keycode.ENTER) {
this.getDOMNode().close();
// call a parent function...
}
},
render: function() {
return (
<dialog className="...">
<h2>...</h2>
<form>
<section>
...
</section>
</form>
</dialog>
);
}
}); I'll take a closer look at the spec for anything else that I may have missed. |
@pekim did you have any success making it work with the dialog polyfill ? |
The |
@pierlo-upitup I'm afraid that I've not used the polyfill. I've been using I think of any reason it wouldn't work with the polyfill, subject to it's documented limitations (such as the |
@pekim in the end it was just that I wasn't registering the polyfill before using it |
Thanks! |
fixes #2017