mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
pad_editbar: Don't pass a callback to toggleDropDown()
The function is synchronous so there's no point.
This commit is contained in:
parent
59d6a8b321
commit
a1b924f746
2 changed files with 21 additions and 26 deletions
|
@ -360,35 +360,31 @@ exports.padeditbar = {
|
|||
this.registerDropdownCommand('embed');
|
||||
|
||||
this.registerCommand('settings', () => {
|
||||
this.toggleDropDown('settings', () => {
|
||||
$('#options-stickychat').focus();
|
||||
});
|
||||
this.toggleDropDown('settings');
|
||||
$('#options-stickychat').focus();
|
||||
});
|
||||
|
||||
this.registerCommand('import_export', () => {
|
||||
this.toggleDropDown('import_export', () => {
|
||||
// If Import file input exists then focus on it..
|
||||
if ($('#importfileinput').length !== 0) {
|
||||
setTimeout(() => {
|
||||
$('#importfileinput').focus();
|
||||
}, 100);
|
||||
} else {
|
||||
$('.exportlink').first().focus();
|
||||
}
|
||||
});
|
||||
this.toggleDropDown('import_export');
|
||||
// If Import file input exists then focus on it..
|
||||
if ($('#importfileinput').length !== 0) {
|
||||
setTimeout(() => {
|
||||
$('#importfileinput').focus();
|
||||
}, 100);
|
||||
} else {
|
||||
$('.exportlink').first().focus();
|
||||
}
|
||||
});
|
||||
|
||||
this.registerCommand('showusers', () => {
|
||||
this.toggleDropDown('users', () => {
|
||||
$('#myusernameedit').focus();
|
||||
});
|
||||
this.toggleDropDown('users');
|
||||
$('#myusernameedit').focus();
|
||||
});
|
||||
|
||||
this.registerCommand('embed', () => {
|
||||
this.setEmbedLinks();
|
||||
this.toggleDropDown('embed', () => {
|
||||
$('#linkinput').focus().select();
|
||||
});
|
||||
this.toggleDropDown('embed');
|
||||
$('#linkinput').focus().select();
|
||||
});
|
||||
|
||||
this.registerCommand('savedRevision', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue