diff --git a/cypress/integration/ui/issues/key-commands.js b/cypress/integration/ui/issues/key-commands.js deleted file mode 100644 index 2b898df9..00000000 --- a/cypress/integration/ui/issues/key-commands.js +++ /dev/null @@ -1,14 +0,0 @@ -import { - visitAndApproveStorage -} from '../../../support/ui-test-helper.js' - -// See https://github.com/SVG-Edit/svgedit/issues/364 -describe('Key commands', function () { - beforeEach(() => { - visitAndApproveStorage() - }) - - it('cmd-A on empty canvas should not cause an error', function () { - cy.get('body').type('{cmd}a') - }) -}) diff --git a/src/editor/Editor.js b/src/editor/Editor.js index 9da5156d..f0c97ec9 100644 --- a/src/editor/Editor.js +++ b/src/editor/Editor.js @@ -134,7 +134,10 @@ class Editor extends EditorStartup { */ loadSvgString (str, { noAlert } = {}) { const success = this.svgCanvas.setSvgString(str) !== false - if (success) return + if (success) { + this.updateCanvas() + return + } if (!noAlert) seAlert(this.i18next.t('notification.errorLoadingSVG')) throw new Error('Error loading SVG') }