File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ var Modal = module.exports = React.createClass({
4949 if ( props . ariaHideApp ) {
5050 ariaAppHider . toggle ( props . isOpen , props . appElement ) ;
5151 }
52+ sanitizeProps ( props ) ;
5253 this . portal = React . renderComponent ( ModalPortal ( props ) , this . node ) ;
5354 } ,
5455
@@ -57,3 +58,7 @@ var Modal = module.exports = React.createClass({
5758 }
5859} ) ;
5960
61+ function sanitizeProps ( props ) {
62+ delete props . ref ;
63+ }
64+
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ describe('Modal', function () {
1212 it ( 'has default props' ) ;
1313 it ( 'removes the portal node' ) ;
1414 it ( 'scopes tab navigation to the modal' ) ;
15- it ( 'ignores clicks outside of it' ) ;
1615 it ( 'focuses the modal' ) ;
1716 it ( 'focuses the last focused element when tabbing in from browser chrome' ) ;
1817 it ( 'adds --after-open for animations' ) ;
1918 it ( 'adds --before-close for animations' ) ;
19+ it ( 'does not freak out when you hand it a ref' ) ;
2020} ) ;
2121
You can’t perform that action at this time.
0 commit comments