Prevent markdown editor from stealing input focus on enter
This commit is contained in:
committed by
Sebastiaan Janssen
parent
d0e7344e2d
commit
7cb0886b35
@@ -1239,6 +1239,11 @@
|
||||
// Perform the button's action.
|
||||
function doClick(button) {
|
||||
|
||||
// don't do anything if the editor input or button bar isn't the currently active element
|
||||
if (document.activeElement !== panels.input && !panels.buttonBar.contains(document.activeElement)) {
|
||||
return;
|
||||
}
|
||||
|
||||
inputBox.focus();
|
||||
|
||||
if (button.textOp) {
|
||||
|
||||
Reference in New Issue
Block a user