From 0f14c3eef97a1f592184395b9b20a6c303a7c3b6 Mon Sep 17 00:00:00 2001 From: GeorgeSmith215 <77789341+GeorgeSmith215@users.noreply.github.com> Date: Tue, 30 Jul 2024 20:40:59 +0800 Subject: [PATCH] fix(history): fix the bug that the cursor of workspace will turn into pointer after triggering undo (#500) Co-authored-by: GeorgeSmith --- packages/core/utils/fabric-history.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/utils/fabric-history.js b/packages/core/utils/fabric-history.js index 6087c45f..868542c7 100644 --- a/packages/core/utils/fabric-history.js +++ b/packages/core/utils/fabric-history.js @@ -134,6 +134,9 @@ fabric.Canvas.prototype.redo = function (callback) { fabric.Canvas.prototype._loadHistory = function (history, event, callback) { var that = this; + history?.objects?.forEach((item) => { + if (item?.id === 'workspace') item.evented = false; + }); this.loadFromJSON(history, function () { that.renderAll(); that.fire(event);