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
1010import React , { Component } from 'react' ;
1111import { Icon } from "../SLDSIcons" ;
1212import ListItem from "./list-item" ;
13+ import { EventUtil } from '../utils'
1314
1415module . exports = React . createClass ( {
1516
@@ -147,6 +148,10 @@ module.exports = React.createClass({
147148 } ) ;
148149 } ,
149150
151+ handleMouseDown ( event ) {
152+ EventUtil . trapImmediate ( event ) ;
153+ } ,
154+
150155 render ( ) {
151156 return (
152157 < div
@@ -155,6 +160,7 @@ module.exports = React.createClass({
155160 style = { {
156161 maxHeight :260
157162 } }
163+ onMouseDown = { this . handleMouseDown }
158164 >
159165 < ul
160166 ref = "scroll"
Original file line number Diff line number Diff line change @@ -30,9 +30,15 @@ const EventUtil = {
3030 } ,
3131
3232 trapImmediate ( event ) {
33+
34+ if ( event . stopImmediatePropagation ) {
35+ event . stopImmediatePropagation ( ) ;
36+ }
37+
3338 if ( event . nativeEvent && event . nativeEvent . stopImmediatePropagation ) {
3439 event . nativeEvent . stopImmediatePropagation ( ) ;
3540 }
41+
3642 EventUtil . trap ( event ) ;
3743 }
3844
You can’t perform that action at this time.
0 commit comments