Merge pull request #381 from glowing-bear/fix-esc

Properly iterate over modals in ESC key handler
rewrite-with-urlplugin
David Cormier 11 years ago
commit 7ee237cf3a
  1. 2
      js/glowingbear.js

@ -1535,7 +1535,7 @@ weechat.directive('inputBar', function() {
// Check if a modal is visible. If so, close it instead of disconnecting
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') {
modals[modalId].setAttribute('data-state', 'hidden');
return true;

Loading…
Cancel
Save