Skip to content

Commit

Permalink
chore: better restoreFocus check
Browse files Browse the repository at this point in the history
  • Loading branch information
jarekdanielak committed Nov 20, 2024
1 parent 9f30778 commit fea0fb2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/render/BpmnPropertiesPanelRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ export default class BpmnPropertiesPanelRenderer {

_restoreCanvasFocus() {
const canvas = this._injector.get('canvas');
canvas && canvas.restoreFocus && canvas.restoreFocus();

// Only available with diagram-js >= 15.0.0
if (canvas.restoreFocus) {
canvas.restoreFocus();
}
}

_render(element) {
Expand Down

0 comments on commit fea0fb2

Please sign in to comment.