File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
10
10
import React , { Component } from 'react' ;
11
11
import { Icon } from "../SLDSIcons" ;
12
12
import ListItem from "./list-item" ;
13
+ import { EventUtil } from '../utils'
13
14
14
15
module . exports = React . createClass ( {
15
16
@@ -147,6 +148,10 @@ module.exports = React.createClass({
147
148
} ) ;
148
149
} ,
149
150
151
+ handleMouseDown ( event ) {
152
+ EventUtil . trapImmediate ( event ) ;
153
+ } ,
154
+
150
155
render ( ) {
151
156
return (
152
157
< div
@@ -155,6 +160,7 @@ module.exports = React.createClass({
155
160
style = { {
156
161
maxHeight :260
157
162
} }
163
+ onMouseDown = { this . handleMouseDown }
158
164
>
159
165
< ul
160
166
ref = "scroll"
Original file line number Diff line number Diff line change @@ -30,9 +30,15 @@ const EventUtil = {
30
30
} ,
31
31
32
32
trapImmediate ( event ) {
33
+
34
+ if ( event . stopImmediatePropagation ) {
35
+ event . stopImmediatePropagation ( ) ;
36
+ }
37
+
33
38
if ( event . nativeEvent && event . nativeEvent . stopImmediatePropagation ) {
34
39
event . nativeEvent . stopImmediatePropagation ( ) ;
35
40
}
41
+
36
42
EventUtil . trap ( event ) ;
37
43
}
38
44
You can’t perform that action at this time.
0 commit comments