Skip to content

Commit 492222b

Browse files
committed
Merge branch 'master' into lookup
2 parents 47ace04 + a860be2 commit 492222b

File tree

12 files changed

+225
-120
lines changed

12 files changed

+225
-120
lines changed

components/SLDSPicklistBase/list.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1010
import React, { Component } from 'react';
1111
import {Icon} from "../SLDSIcons";
1212
import ListItem from "./list-item";
13+
import {EventUtil} from '../utils'
1314

1415
module.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"

components/utils/EventUtil.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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

dist/design-system-react.js

Lines changed: 93 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/design-system-react.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)