Skip to content

Commit 5455eaf

Browse files
committed
chore: restore focus on context pad click
1 parent 53d026e commit 5455eaf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/features/context-pads/ContextPads.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ ContextPads.prototype.updateElementContextPads = function(element) {
212212

213213
ContextPads.prototype._updateElementContextPads = function(element, handler) {
214214

215+
const canvas = this._canvas;
216+
215217
const contextPads = (handler.createContextPads(element) || []).filter(p => p);
216218

217219
const handlerHash = `${element.id}------${handler.hash}`;
@@ -275,6 +277,10 @@ ContextPads.prototype._updateElementContextPads = function(element, handler) {
275277
: null;
276278

277279
_action(contexts);
280+
281+
if ('restoreFocus' in canvas) {
282+
canvas.restoreFocus();
283+
}
278284
});
279285
}
280286

0 commit comments

Comments
 (0)