Fossil SCM

Settings menu now closes if a click or ESC happens outside of the menu.

stephan 2020-12-26 01:37 chat-mode-bottom-up
Commit 1f000368845a6d994735db760a02d0cb10ff5eee1d91526b1fbac1c7ccd8a13e
1 file changed +3 -6
+3 -6
--- src/chat.js
+++ src/chat.js
@@ -642,16 +642,13 @@
642642
}
643643
D.append(settingsPopup.e, line);
644644
btn.addEventListener('click', callback);
645645
});
646646
};
647
- /**
648
- Reminder:
649
- settingsPopup.installClickToHide();
650
- Don't do this for this popup! It interferes with the embedded
651
- "?" buttons in the popup, which are also PopupWidget users.
652
- */
647
+ settingsPopup.installClickToHide()
648
+ /** Reminder: that interferes with "?" embedded within the popup,
649
+ so cannot be used together with those. */;
653650
D.attr(settingsButton, 'role', 'button');
654651
settingsButton.addEventListener('click',function(ev){
655652
//ev.preventDefault();
656653
if(settingsPopup.isShown()) settingsPopup.hide();
657654
else settingsPopup.show(settingsButton);
658655
--- src/chat.js
+++ src/chat.js
@@ -642,16 +642,13 @@
642 }
643 D.append(settingsPopup.e, line);
644 btn.addEventListener('click', callback);
645 });
646 };
647 /**
648 Reminder:
649 settingsPopup.installClickToHide();
650 Don't do this for this popup! It interferes with the embedded
651 "?" buttons in the popup, which are also PopupWidget users.
652 */
653 D.attr(settingsButton, 'role', 'button');
654 settingsButton.addEventListener('click',function(ev){
655 //ev.preventDefault();
656 if(settingsPopup.isShown()) settingsPopup.hide();
657 else settingsPopup.show(settingsButton);
658
--- src/chat.js
+++ src/chat.js
@@ -642,16 +642,13 @@
642 }
643 D.append(settingsPopup.e, line);
644 btn.addEventListener('click', callback);
645 });
646 };
647 settingsPopup.installClickToHide()
648 /** Reminder: that interferes with "?" embedded within the popup,
649 so cannot be used together with those. */;
 
 
 
650 D.attr(settingsButton, 'role', 'button');
651 settingsButton.addEventListener('click',function(ev){
652 //ev.preventDefault();
653 if(settingsPopup.isShown()) settingsPopup.hide();
654 else settingsPopup.show(settingsButton);
655

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button