mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
working f9 logic
This commit is contained in:
parent
bc760e9494
commit
e9360b6ed2
3 changed files with 6 additions and 2 deletions
|
@ -3711,11 +3711,12 @@ function Ace2Inner(){
|
||||||
// Alt F9 focuses on the File Menu and/or editbar.
|
// Alt F9 focuses on the File Menu and/or editbar.
|
||||||
// Note that while most editors use Alt F10 this is not desirable
|
// Note that while most editors use Alt F10 this is not desirable
|
||||||
// As ubuntu cannot use Alt F10....
|
// As ubuntu cannot use Alt F10....
|
||||||
evt.preventDefault();
|
|
||||||
// Focus on the editbar. -- TODO: Move Focus back to previous state (we know it so we can use it)
|
// Focus on the editbar. -- TODO: Move Focus back to previous state (we know it so we can use it)
|
||||||
var firstEditbarElement = parent.parent.$('#editbar').children("ul").first().children().first().children().first().children().first();
|
var firstEditbarElement = parent.parent.$('#editbar').children("ul").first().children().first().children().first().children().first();
|
||||||
firstEditbarElement.focus();
|
// top.console.log("fEE", firstEditbarElement);
|
||||||
$(this).blur();
|
$(this).blur();
|
||||||
|
firstEditbarElement.focus();
|
||||||
|
evt.preventDefault();
|
||||||
}
|
}
|
||||||
if ((!specialHandled) && isTypeForSpecialKey && keyCode == 8)
|
if ((!specialHandled) && isTypeForSpecialKey && keyCode == 8)
|
||||||
{
|
{
|
||||||
|
|
1
src/static/js/lodash.js
Normal file
1
src/static/js/lodash.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
module.exports = require('lodash');
|
|
@ -63,6 +63,7 @@ ToolbarItem.prototype.bind = function (callback) {
|
||||||
|
|
||||||
if (self.isButton()) {
|
if (self.isButton()) {
|
||||||
self.$el.click(function (event) {
|
self.$el.click(function (event) {
|
||||||
|
$(':focus').blur();
|
||||||
callback(self.getCommand(), self);
|
callback(self.getCommand(), self);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
@ -311,6 +312,7 @@ var padeditbar = (function()
|
||||||
// Send the users focus back to the pad
|
// Send the users focus back to the pad
|
||||||
if(evt.keyCode === 120){
|
if(evt.keyCode === 120){
|
||||||
// If we're in the editbar already..
|
// If we're in the editbar already..
|
||||||
|
$(':focus').blur(); // required to do not try to remove!
|
||||||
padeditor.ace.focus(); // Sends focus back
|
padeditor.ace.focus(); // Sends focus back
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue