Skip to content
This repository was archived by the owner on Nov 15, 2017. It is now read-only.

Commit 3326220

Browse files
committed
hopefully this fixes #111
1 parent 95ed3fe commit 3326220

File tree

4 files changed

+46
-11
lines changed

4 files changed

+46
-11
lines changed

css/popup.css

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ body {
5757
border: 0;
5858
padding: 3px 0 0 0;
5959
position: absolute;
60-
z-index: 20;
60+
z-index: 1000;
6161
font-size: 110%;
6262
display: none;
6363
}
@@ -92,10 +92,27 @@ body {
9292
font-size: 110%;
9393
color: #aaa;
9494
}
95-
.dropdown-menu-button ~ .dropdown-menu {
95+
.dropdown-menu {
96+
display: none;
97+
}
98+
.dropdown-menu.show {
99+
display: block;
100+
}
101+
.dropdown-menu-capture {
102+
margin: 0;
103+
border: 0;
104+
padding: 0;
105+
position: fixed;
106+
top: 0;
107+
bottom: 0;
108+
left: 0;
109+
right: 0;
110+
background-color: transparent;
111+
opacity: 0.1;
96112
display: none;
113+
z-index: 900;
97114
}
98-
.dropdown-menu-button:focus ~ .dropdown-menu {
115+
.dropdown-menu-capture.show {
99116
display: block;
100117
}
101118

js/popup.js

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

14301442
function 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');

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "__MSG_extName__",
4-
"version": "0.7.3.0",
4+
"version": "0.7.3.1",
55
"description": "__MSG_extShortDesc__",
66
"icons": {
77
"16": "icon_16.png",

popup.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<li id="buttonPower" class="dropdown-menu-entry"><i class="fa">&#xf011;</i><span>On/off</span></li>
3131
</ul>
3232
</div>
33+
<div class="dropdown-menu-capture"></div>
3334
<!-- <div id="message"></div> -->
3435
</div>
3536

@@ -42,7 +43,8 @@
4243
<li id="scopeKeySite" class="dropdown-menu-entry">
4344
</ul>
4445
</div>
45-
</div>
46+
<div class="dropdown-menu-capture"></div>
47+
</div>
4648

4749
<div class="toolbar">
4850
<button id="buttonPersist" type="button" class="fa">&#xf023;</button>

0 commit comments

Comments
 (0)