File tree Expand file tree Collapse file tree 3 files changed +8
-19
lines changed Expand file tree Collapse file tree 3 files changed +8
-19
lines changed Original file line number Diff line number Diff line change @@ -261,12 +261,7 @@ module.exports = React.createClass( {
261
261
this . setState ( { isOpen :false } )
262
262
}
263
263
}
264
- /* resolve a double click issue with the modal */
265
- } else if ( this . props . modal && this . state . isFocused && prevState . isFocused ) {
266
- if ( ! this . state . isOpen ) {
267
- this . setState ( { isOpen : true } ) ;
268
- }
269
- }
264
+ }
270
265
271
266
272
267
if ( this . props . value !== prevProps . value ) {
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ module.exports = React.createClass({
90
90
this . props . onMoveFocus ( - 1 ) ;
91
91
}
92
92
}
93
- else if ( event . keyCode === KEYS . ENTER ||
93
+ else if ( event . keyCode === KEYS . ENTER ||
94
94
event . keyCode === KEYS . SPACE ) {
95
95
EventUtil . trapEvent ( event ) ;
96
96
if ( this . props . onSelect ) {
@@ -116,9 +116,7 @@ module.exports = React.createClass({
116
116
} ,
117
117
118
118
handleBlur ( e ) {
119
- if ( this . props . onBlur &&
120
- this . refs . link . getDOMNode ( ) !== e . target ) {
121
-
119
+ if ( this . props . onBlur ) {
122
120
this . props . onBlur ( this . props . index , e . relatedTarget ) ;
123
121
}
124
122
} ,
@@ -132,15 +130,15 @@ module.exports = React.createClass({
132
130
133
131
render ( ) {
134
132
return (
135
- < li
133
+ < li
136
134
137
135
className = { "slds-dropdown__item slds-has-icon slds-has-icon--left slds-theme--" + this . props . theme }
138
136
onMouseDown = { this . handleMouseDown }
139
137
tabIndex = { - 1 } >
140
138
< a id = { 'menu-0-' + this . props . index }
141
139
href = ''
142
140
ref = 'link'
143
- className = 'slds-truncate'
141
+ className = 'slds-truncate'
144
142
onClick = { this . handleClick }
145
143
onMouseDown = { this . handleMouseDown }
146
144
onKeyDown = { this . handleKeyDown }
Original file line number Diff line number Diff line change @@ -16,12 +16,8 @@ const EventUtil = {
16
16
trapEvent ( event ) {
17
17
event . preventDefault ( ) ;
18
18
event . stopPropagation ( ) ;
19
-
20
- if ( event . nativeEvent && event . nativeEvent . preventDefault ) {
19
+ if ( event . nativeEvent ) {
21
20
event . nativeEvent . preventDefault ( ) ;
22
- }
23
-
24
- if ( event . nativeEvent && event . nativeEvent . stopPropagation ) {
25
21
event . nativeEvent . stopPropagation ( ) ;
26
22
}
27
23
} ,
@@ -31,12 +27,12 @@ const EventUtil = {
31
27
} ,
32
28
33
29
trapImmediate ( event ) {
34
- if ( event . nativeEvent && event . nativeEvent . stopImmediatePropagation ) {
30
+ if ( event . nativeEvent ) {
35
31
event . nativeEvent . stopImmediatePropagation ( ) ;
36
32
}
37
33
EventUtil . trap ( event ) ;
38
34
}
39
35
40
36
} ;
41
37
42
- module . exports = EventUtil ;
38
+ module . exports = EventUtil ;
You can’t perform that action at this time.
0 commit comments