You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var React = require('react');
var mui = require('material-ui');
var TestTouchTap = React.createClass({
render: function() {
return (
<div className='mui-app-content-canvas'>
<mui.Dialog ref='helpDialog' title='How to debug'>
1. restart the computer
</mui.Dialog>
<mui.Paper>
<form>
<mui.IconButton iconClassName='icon-action-black icon-action-black-ic_help_black_24dp' onTouchTap={this.handleHelp}/>
</form>
</mui.Paper>
</div>
);
},
handleHelp: function(e) {
e.preventDefault();
console.log("handleHelp");
this.refs.helpDialog.show();
},
});
module.exports = TestTouchTap;
Modify the iconClassName as needed.
Assume the page has url localhost:8000/test. When I click the button, the dialog shows, then immediately it auto navigates to localhost:8000/test? and in the console there is a log Navigated to http://localhost:8000/test?, and the dialog disappears.
When I change the event to onClick, the dialog holds as expected and there is no auto navigation.
The text was updated successfully, but these errors were encountered:
@liyichao Did you try setting the IconButton type to "button" ?
hai-cea
changed the title
Wield IconButton OnTouchTap behavior: auto navigates to url?
[IconButton] Wield IconButton OnTouchTap behavior: auto navigates to url?Jun 18, 2015
this is a test page:
Modify the iconClassName as needed.
Assume the page has url
localhost:8000/test
. When I click the button, the dialog shows, then immediately it auto navigates tolocalhost:8000/test?
and in the console there is a logNavigated to http://localhost:8000/test?
, and the dialog disappears.When I change the event to
onClick
, the dialog holds as expected and there is no auto navigation.The text was updated successfully, but these errors were encountered: