Click on blank part of editor to defocus in Chromium based browsers

In Chromium based browsers you can now click the blank part of the
editor to submit changes. This is to maintain consistency with the
editor behaviour in Firefox which already did this when you clicked on
the blank part of the editor.
This commit is contained in:
vfbd 2022-06-30 11:31:54 -04:00
parent accbaea991
commit ce5f4d3dda

View File

@ -2510,6 +2510,12 @@ $(document).ready(function(){
chunkOnFocusOut
);
mutation_observer = new MutationObserver(chunkOnDOMMutate);
$("#gamescreen").on('click', function(e) {
if(this !== e.target) {
return;
}
document.activeElement.blur();
});
// This is required for the editor to work correctly in Firefox on desktop
// because the gods of HTML and JavaScript say so