Browse Source

restore contentEditable when cancelling format page

Gildas 5 years ago
parent
commit
a16b1359ed
1 changed files with 4 additions and 2 deletions
  1. 4 2
      extension/ui/content/content-ui-editor-web.js

+ 4 - 2
extension/ui/content/content-ui-editor-web.js

@@ -1535,9 +1535,11 @@ table {
 		onUpdate(false);
 	}
 
-	function cancelFormatPage() {
+	async function cancelFormatPage() {
 		if (previousContent) {
-			init(previousContent);
+			const contentEditable = document.body.contentEditable;
+			await init(previousContent);
+			document.body.contentEditable = contentEditable;
 			previousContent = null;
 		}
 	}