From 326d32658e5bbef6ce819907d12ab428a2052b99 Mon Sep 17 00:00:00 2001 From: mattpass Date: Wed, 1 Jul 2020 19:27:36 +0100 Subject: [PATCH] Fix broken display after diff mode from backups modal --- lib/backup-versions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/backup-versions.php b/lib/backup-versions.php index e6cb202..529bd90 100644 --- a/lib/backup-versions.php +++ b/lib/backup-versions.php @@ -129,9 +129,11 @@ let openDiff = function() { parent.ICEcoder.showHide('hide',parent.document.getElementById('blackMask')); parent.ICEcoder.setSplitPane('on'); cMDiff = parent.ICEcoder.getcMdiffInstance(); - parent.ICEcoder.focus('diff'); cMDiff.setValue(editor.getValue()); -} + setTimeout(function() { + cMDiff.focus(); + }, 100); +}; let restoreVersion = function() { let cM; @@ -139,9 +141,9 @@ let restoreVersion = function() { if (parent.ICEcoder.ask("To confirm - this will paste the displayed backup content to your current tab and save, OK?")) { parent.ICEcoder.showHide('hide',parent.document.getElementById('blackMask')); cM = parent.ICEcoder.getcMInstance(); - parent.ICEcoder.focus(); cM.setValue(editor.getValue()); parent.ICEcoder.saveFile(false, false); + cM.focus(); } }