Merge pull request #381 from glowing-bear/fix-esc
Properly iterate over modals in ESC key handler
This commit is contained in:
commit
7ee237cf3a
1 changed files with 1 additions and 1 deletions
|
@ -1535,7 +1535,7 @@ weechat.directive('inputBar', function() {
|
||||||
|
|
||||||
// Check if a modal is visible. If so, close it instead of disconnecting
|
// Check if a modal is visible. If so, close it instead of disconnecting
|
||||||
var modals = document.querySelectorAll('.gb-modal');
|
var modals = document.querySelectorAll('.gb-modal');
|
||||||
for (var modalId in modals) {
|
for (var modalId = 0; modalId < modals.length; modalId++) {
|
||||||
if (modals[modalId].getAttribute('data-state') === 'visible') {
|
if (modals[modalId].getAttribute('data-state') === 'visible') {
|
||||||
modals[modalId].setAttribute('data-state', 'hidden');
|
modals[modalId].setAttribute('data-state', 'hidden');
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue