@@ -1425,6 +1425,18 @@ function gotoExternalURL() {
14251425
14261426/******************************************************************************/
14271427
1428+ function dropDownMenuShow ( ) {
1429+ $ ( '.dropdown-menu-capture' ) . addClass ( 'show' ) ;
1430+ $ ( this ) . next ( '.dropdown-menu' ) . addClass ( 'show' ) ;
1431+ }
1432+
1433+ function dropDownMenuHide ( ) {
1434+ $ ( '.dropdown-menu-capture' ) . removeClass ( 'show' ) ;
1435+ $ ( '.dropdown-menu' ) . removeClass ( 'show' ) ;
1436+ }
1437+
1438+ /******************************************************************************/
1439+
14281440// make menu only when popup html is fully loaded
14291441
14301442function initAll ( ) {
@@ -1467,9 +1479,9 @@ function initAll() {
14671479 . on ( 'mouseenter' , '.matCell' , mouseenterMatrixCellHandler )
14681480 . on ( 'mouseleave' , '.matCell' , mouseleaveMatrixCellHandler ) ;
14691481 $ ( '#buttonPersist' ) . on ( 'click' , persistScope ) ;
1470- $ ( '#scopeKeyGlobal' ) . on ( 'mousedown ' , createGlobalScope ) ;
1471- $ ( '#scopeKeyDomain' ) . on ( 'mousedown ' , createDomainScope ) ;
1472- $ ( '#scopeKeySite' ) . on ( 'mousedown ' , createSiteScope ) ;
1482+ $ ( '#scopeKeyGlobal' ) . on ( 'click ' , createGlobalScope ) ;
1483+ $ ( '#scopeKeyDomain' ) . on ( 'click ' , createDomainScope ) ;
1484+ $ ( '#scopeKeySite' ) . on ( 'click ' , createSiteScope ) ;
14731485 $ ( '#buttonReload' ) . on ( 'click' , forceReload ) ;
14741486 $ ( '#buttonRevert' )
14751487 . on ( 'mouseenter' , function ( ) { showMessage ( chrome . i18n . getMessage ( 'matrixRevert' ) ) ; } )
@@ -1478,9 +1490,13 @@ function initAll() {
14781490 $ ( '#buttonRuleManager span' ) . text ( chrome . i18n . getMessage ( 'ruleManagerPageName' ) ) ;
14791491 $ ( '#buttonInfo span' ) . text ( chrome . i18n . getMessage ( 'statsPageName' ) ) ;
14801492 $ ( '#buttonSettings span' ) . text ( chrome . i18n . getMessage ( 'settingsPageName' ) ) ;
1481- $ ( '.extensionURL' ) . on ( 'mousedown' , gotoExtensionURL ) ;
1482- $ ( '.externalURL' ) . on ( 'mousedown' , gotoExternalURL ) ;
1483- $ ( '#buttonPower' ) . on ( 'mousedown' , togglePower ) ;
1493+ $ ( '.extensionURL' ) . on ( 'click' , gotoExtensionURL ) ;
1494+ $ ( '.externalURL' ) . on ( 'click' , gotoExternalURL ) ;
1495+ $ ( '#buttonPower' ) . on ( 'click' , togglePower ) ;
1496+
1497+ $ ( 'body' ) . on ( 'click' , '.dropdown-menu-button' , dropDownMenuShow ) ;
1498+ $ ( 'body' ) . on ( 'click' , '.dropdown-menu-capture' , dropDownMenuHide ) ;
1499+
14841500 $ ( '#matList' ) . on ( 'click' , '.g3Meta' , function ( ) {
14851501 var separator = $ ( this ) ;
14861502 separator . toggleClass ( 'g3Collapsed' ) ;
0 commit comments