mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2024-12-23 15:36:12 +00:00
Improvement: Add escape support on popup
This commit is contained in:
parent
5a2c30e00f
commit
1e5e450565
@ -495,6 +495,7 @@ dial.editSettings = function(){
|
|||||||
iframe.src = '/html/settings.html';
|
iframe.src = '/html/settings.html';
|
||||||
iframe.popup = popup;
|
iframe.popup = popup;
|
||||||
popup.popup();
|
popup.popup();
|
||||||
|
iframe.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
dial.editProperties = function(selectedItem){
|
dial.editProperties = function(selectedItem){
|
||||||
@ -510,4 +511,5 @@ dial.editProperties = function(selectedItem){
|
|||||||
iframe.src = '/html/properties.html?id=' + selectedItem.Node.id;
|
iframe.src = '/html/properties.html?id=' + selectedItem.Node.id;
|
||||||
iframe.popup = popup;
|
iframe.popup = popup;
|
||||||
popup.popup();
|
popup.popup();
|
||||||
|
iframe.focus();
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,13 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.init = function(){
|
app.init = function(){
|
||||||
|
document.addEventListener('keyup', function(e){
|
||||||
|
switch(e.key){
|
||||||
|
case 'Escape':
|
||||||
|
window.frameElement.popup.close();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
app.Messages.getSettings(function(settings){
|
app.Messages.getSettings(function(settings){
|
||||||
app.settings = settings;
|
app.settings = settings;
|
||||||
app.Messages.getNodeByID(new URL(window.location).searchParams.get('id'), function(node){
|
app.Messages.getNodeByID(new URL(window.location).searchParams.get('id'), function(node){
|
||||||
|
@ -10,6 +10,13 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|||||||
|
|
||||||
|
|
||||||
app.init = function(){
|
app.init = function(){
|
||||||
|
document.addEventListener('keyup', function(e){
|
||||||
|
switch(e.key){
|
||||||
|
case 'Escape':
|
||||||
|
window.frameElement.popup.close();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
app.Messages.getSettings(function(settings){
|
app.Messages.getSettings(function(settings){
|
||||||
app.settings = settings;
|
app.settings = settings;
|
||||||
BackgroundColor.value = app.settings.backgroundColor;
|
BackgroundColor.value = app.settings.backgroundColor;
|
||||||
|
Loading…
Reference in New Issue
Block a user