File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 " framework"
1616 ],
1717 "license" : " MIT" ,
18- "version" : " 2.3.3 "
18+ "version" : " 2.4.0 "
1919}
Original file line number Diff line number Diff line change 11/*!
2- * # Semantic UI 2.3.3 - Popup
2+ * # Semantic UI 2.4.0 - Popup
33 * http://github.com/semantic-org/semantic-ui/
44 *
55 *
@@ -1013,12 +1013,12 @@ module.exports = function(parameters) {
10131013 if ( settings . hideOnScroll === true || ( settings . hideOnScroll == 'auto' && settings . on != 'click' ) ) {
10141014 module . bind . closeOnScroll ( ) ;
10151015 }
1016- if ( settings . on == 'hover' && openedWithTouch ) {
1017- module . bind . touchClose ( ) ;
1018- }
1019- if ( settings . on == 'click' && settings . closable ) {
1016+ if ( module . is . closable ( ) ) {
10201017 module . bind . clickaway ( ) ;
10211018 }
1019+ else if ( settings . on == 'hover' && openedWithTouch ) {
1020+ module . bind . touchClose ( ) ;
1021+ }
10221022 } ,
10231023 closeOnScroll : function ( ) {
10241024 module . verbose ( 'Binding scroll close event to document' ) ;
@@ -1074,10 +1074,19 @@ module.exports = function(parameters) {
10741074 should : {
10751075 centerArrow : function ( calculations ) {
10761076 return ! module . is . basic ( ) && calculations . target . width <= ( settings . arrowPixelsFromEdge * 2 ) ;
1077- }
1077+ } ,
10781078 } ,
10791079
10801080 is : {
1081+ closable : function ( ) {
1082+ if ( settings . closable == 'auto' ) {
1083+ if ( settings . on == 'hover' ) {
1084+ return false ;
1085+ }
1086+ return true ;
1087+ }
1088+ return settings . closable ;
1089+ } ,
10811090 offstage : function ( distanceFromBoundary , position ) {
10821091 var
10831092 offstage = [ ]
Original file line number Diff line number Diff line change 11{
22 "name" : " semantic-ui-popup" ,
3- "version" : " 2.3.3 " ,
3+ "version" : " 2.4.0 " ,
44 "title" : " Semantic UI - Popup" ,
55 "description" : " Single component release of popup" ,
66 "homepage" : " http://www.semantic-ui.com" ,
Original file line number Diff line number Diff line change 11/*!
2- * # Semantic UI 2.3.3 - Popup
2+ * # Semantic UI 2.4.0 - Popup
33 * http://github.com/semantic-org/semantic-ui/
44 *
55 *
Original file line number Diff line number Diff line change 11/*!
2- * # Semantic UI 2.3.3 - Popup
2+ * # Semantic UI 2.4.0 - Popup
33 * http://github.com/semantic-org/semantic-ui/
44 *
55 *
@@ -1012,12 +1012,12 @@ $.fn.popup = function(parameters) {
10121012 if ( settings . hideOnScroll === true || ( settings . hideOnScroll == 'auto' && settings . on != 'click' ) ) {
10131013 module . bind . closeOnScroll ( ) ;
10141014 }
1015- if ( settings . on == 'hover' && openedWithTouch ) {
1016- module . bind . touchClose ( ) ;
1017- }
1018- if ( settings . on == 'click' && settings . closable ) {
1015+ if ( module . is . closable ( ) ) {
10191016 module . bind . clickaway ( ) ;
10201017 }
1018+ else if ( settings . on == 'hover' && openedWithTouch ) {
1019+ module . bind . touchClose ( ) ;
1020+ }
10211021 } ,
10221022 closeOnScroll : function ( ) {
10231023 module . verbose ( 'Binding scroll close event to document' ) ;
@@ -1073,10 +1073,19 @@ $.fn.popup = function(parameters) {
10731073 should : {
10741074 centerArrow : function ( calculations ) {
10751075 return ! module . is . basic ( ) && calculations . target . width <= ( settings . arrowPixelsFromEdge * 2 ) ;
1076- }
1076+ } ,
10771077 } ,
10781078
10791079 is : {
1080+ closable : function ( ) {
1081+ if ( settings . closable == 'auto' ) {
1082+ if ( settings . on == 'hover' ) {
1083+ return false ;
1084+ }
1085+ return true ;
1086+ }
1087+ return settings . closable ;
1088+ } ,
10801089 offstage : function ( distanceFromBoundary , position ) {
10811090 var
10821091 offstage = [ ]
You can’t perform that action at this time.
0 commit comments