Skip to content

Commit

Permalink
Merge pull request #3310 from newoga/#3305/dialog
Browse files Browse the repository at this point in the history
[Dialog] Remove window-listenable mixin
  • Loading branch information
oliviertassinari committed Feb 12, 2016
2 parents e81c4af + 2d81c05 commit f0fc7e7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/dialog.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import WindowListenable from './mixins/window-listenable';
import EventListener from 'react-event-listener';
import KeyCode from './utils/key-code';
import Transitions from './styles/transitions';
import Overlay from './overlay';
Expand Down Expand Up @@ -191,8 +191,6 @@ const DialogInline = React.createClass({
muiTheme: React.PropTypes.object,
},

mixins: [WindowListenable],

getInitialState() {
return {
muiTheme: this.context.muiTheme || getMuiTheme(),
Expand All @@ -219,11 +217,6 @@ const DialogInline = React.createClass({
this._positionDialog();
},

windowListeners: {
keyup: '_handleWindowKeyUp',
resize: '_handleResize',
},

_positionDialog() {
const {
actions,
Expand Down Expand Up @@ -347,6 +340,11 @@ const DialogInline = React.createClass({

return (
<div className={className} style={prepareStyles(styles.root)}>
<EventListener
elementName="window"
onKeyUp={this._handleWindowKeyUp}
onResize={this._handleResize}
/>
<ReactTransitionGroup
component="div" ref="dialogWindow"
transitionAppear={true} transitionAppearTimeout={450}
Expand Down

0 comments on commit f0fc7e7

Please sign in to comment.