File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ export default class Trigger extends React.Component {
78
78
maskAnimation : PropTypes . string ,
79
79
stretch : PropTypes . string ,
80
80
alignPoint : PropTypes . bool , // Maybe we can support user pass position in the future
81
+ ignoreVisibilityChangeClassName : PropTypes . string ,
81
82
} ;
82
83
83
84
static contextTypes = contextTypes ;
@@ -105,6 +106,7 @@ export default class Trigger extends React.Component {
105
106
action : [ ] ,
106
107
showAction : [ ] ,
107
108
hideAction : [ ] ,
109
+ ignoreVisibilityChangeClassName : '' ,
108
110
} ;
109
111
110
112
constructor ( props ) {
@@ -326,8 +328,16 @@ export default class Trigger extends React.Component {
326
328
if ( this . props . mask && ! this . props . maskClosable ) {
327
329
return ;
328
330
}
329
-
331
+ const { ignoreVisibilityChangeClassName } = this . props ;
330
332
const target = event . target ;
333
+ if (
334
+ ignoreVisibilityChangeClassName &&
335
+ typeof target . className === 'string' &&
336
+ target . className . split ( ' ' ) . filter ( className => className === ignoreVisibilityChangeClassName )
337
+ . length > 0
338
+ ) {
339
+ return ;
340
+ }
331
341
const root = findDOMNode ( this ) ;
332
342
if ( ! contains ( root , target ) && ! this . hasPopupMouseDown ) {
333
343
this . close ( ) ;
You can’t perform that action at this time.
0 commit comments