Skip to content

Commit 9818d9d

Browse files
committed
make stopPropagation optional, default to true
1 parent 6add815 commit 9818d9d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

public/jquery.selectric.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* /,'
1010
* /'
1111
*
12-
* Selectric ϟ v1.11.0 (Dec 15 2016) - http://lcdsantos.github.io/jQuery-Selectric/
12+
* Selectric ϟ v1.11.0 (Dec 16 2016) - http://lcdsantos.github.io/jQuery-Selectric/
1313
*
1414
* Copyright (c) 2016 Leonardo Santos; MIT License
1515
*
@@ -1072,6 +1072,7 @@
10721072
preventWindowScroll : true,
10731073
inheritOriginalWidth : false,
10741074
allowWrap : true,
1075+
stopPropagation : true,
10751076
optionsItemBuilder : '{text}', // function(itemData, element, index)
10761077
labelBuilder : '{text}', // function(currItem)
10771078
listBuilder : false, // function(items)

src/jquery.selectric.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,9 @@
814814

815815
if ( e ) {
816816
e.preventDefault();
817-
e.stopPropagation();
817+
if (_this.options.stopPropagation) {
818+
e.stopPropagation();
819+
}
818820
}
819821

820822
if ( _this.state.enabled ) {
@@ -1055,6 +1057,7 @@
10551057
preventWindowScroll : true,
10561058
inheritOriginalWidth : false,
10571059
allowWrap : true,
1060+
stopPropagation : true,
10581061
optionsItemBuilder : '{text}', // function(itemData, element, index)
10591062
labelBuilder : '{text}', // function(currItem)
10601063
listBuilder : false, // function(items)

0 commit comments

Comments
 (0)