-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make canvas selectable / keyboard binding implicit #662
Conversation
This can be tried out via:
What I did is to remove any input quirks but rely on canvas to be actually browser selected. As a side-effect though that means that we consistently need to select the canvas when modeling operations happen: I do not see a simple way to accomplish this (yet). At this point we have two options:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
On MacOS, the focus state is persisted once I hover the canvas even if switch tab afterwards and come back. Is this is supposed to work like this? I am not opinionated but it would be logical to me that focus fades away when I move mouse outside without clicking. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Indeed, it's an out of scope feature to be fixed 😆 |
When we implicitly bind to the canvas, does it imply that extensions that rely on the command stack need to catch and trigger undo/redo manually? I'm thinking about the Properties panel here, where the most common case was to bind the keyboard to a common container. I tested it on Edge and it works as expected, no new issues found from my side |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Found the following issues integration testing this against different libraries in our eco-system:
|
Given we follow one of these approaches, would we also have to follow up with explicit keyboard bindings for the Forms Properties Panel? I'm asking because we plan to make it independent from the editor (e.g. render it in an own container, as we do with the other properties panels, cf. bpmn-io/form-js#291). |
Absolutely. Taking it one step at a time here though. Blueprint for properties panel binding can be found here: bpmn-io/bpmn-js-properties-panel#739. |
This is now available as a pre-release via |
This prepares for bpmn-io/diagram-js#662, but is built in a way that is backwards compatible.
This prepares for bpmn-io/diagram-js#662, but is built in a way that is backwards compatible.
This is now implicit, cf. bpmn-io/diagram-js#662
This is now implicit, cf. bpmn-io/diagram-js#662
Editor is now focussed automatically on hover. chore: update to diagram-js@15 Related to bpmn-io/diagram-js#662
This updates the library to diagram-js@15 which ships breaking changes. BREAKING CHANGES: * Keyboard is now implicitly bound to the container element. Calls to `keyboard.bind` with `node` and `keyboard.bindTo` now result with a descriptive console error and have no effect. Related to bpmn-io/diagram-js#662
This updates the library to diagram-js@15 which ships breaking changes. BREAKING CHANGES: * Keyboard is now implicitly bound to the container element. Calls to `keyboard.bind` with `node` and `keyboard.bindTo` now result with a descriptive console error and have no effect. Related to bpmn-io/diagram-js#662
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [dmn-js](https://redirect.github.com/bpmn-io/dmn-js) ([source](https://redirect.github.com/bpmn-io/dmn-js/tree/HEAD/packages/dmn-js)) | [`16.8.2` -> `17.0.3`](https://renovatebot.com/diffs/npm/dmn-js/16.8.2/17.0.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/dmn-js/17.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/dmn-js/17.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/dmn-js/16.8.2/17.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/dmn-js/16.8.2/17.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bpmn-io/dmn-js (dmn-js)</summary> ### [`v17.0.3`](https://redirect.github.com/bpmn-io/dmn-js/blob/HEAD/packages/dmn-js/CHANGELOG.md#1703) [Compare Source](https://redirect.github.com/bpmn-io/dmn-js/compare/v17.0.2...v17.0.3) - `FIX`: port implicit keyboard binding configuration to decision editors ([#​920](https://redirect.github.com/bpmn-io/dmn-js/pull/920)) ### [`v17.0.2`](https://redirect.github.com/bpmn-io/dmn-js/blob/HEAD/packages/dmn-js/CHANGELOG.md#1702) [Compare Source](https://redirect.github.com/bpmn-io/dmn-js/compare/v17.0.1...v17.0.2) - `FIX`: display updated formal parameters suggestions ([#​914](https://redirect.github.com/bpmn-io/dmn-js/pull/914)) ### [`v17.0.1`](https://redirect.github.com/bpmn-io/dmn-js/blob/HEAD/packages/dmn-js/CHANGELOG.md#1701) [Compare Source](https://redirect.github.com/bpmn-io/dmn-js/compare/v17.0.0...v17.0.1) - `FIX`: make name change behavior not break on name change ([#​917](https://redirect.github.com/bpmn-io/dmn-js/pull/917)), port from `v16.8.2` ### [`v17.0.0`](https://redirect.github.com/bpmn-io/dmn-js/blob/HEAD/packages/dmn-js/CHANGELOG.md#1700) [Compare Source](https://redirect.github.com/bpmn-io/dmn-js/compare/v16.8.2...v17.0.0) - `DEPS`: update to `diagram-js@15.2.0` - `DEPS`: update to `diagram-js-direct-editing@3.2.0` - `DEPS`: update to `table-js@9.2.0` ##### Breaking Changes - Keyboard (DRD) is now implicit, and canvas is focusable, cf. ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/camunda/camunda). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` -> `18.1.1`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/bpmn-js/18.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/bpmn-js/18.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/bpmn-js/17.11.1/18.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/bpmn-js/17.11.1/18.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bpmn-io/bpmn-js (bpmn-js)</summary> ### [`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1) - `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953)) - `FIX`: ignore whitespace when searching ([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954)) ### [`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0) - `FIX`: clear selection when opening search pad ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `FIX`: correct dangling selection after search pad interaction ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `DEPS`: update to `diagram-js@15.2.2` ### [`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0) - `FEAT`: remove `outline` from `Viewer` modules ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FEAT`: make `Canvas` a focusable element ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: implicit keyboard binding ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: integrate with global `search` ([#​2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235)) - `FEAT`: integrate `popup-menu` with `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: find `search` terms across all keys ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: `search` always returns tokens for matched items ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: prevent crash during label adjustment ([#​2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239)) - `FIX`: keep existing loop characteristics when toggling through the replace menu ([#​2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251)) - `FIX`: prevent covering multi selection with black box in `Viewer` ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FIX`: generate types for main entry ([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179)) - `FIX`: correct handling of group name with whitespace only ([#​2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231)) - `DEPS`: update to `bpmn-moddle@9` ([#​2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114)) - `DEPS`: update to `diagram-js@15.1.0` - `DEPS`: update to `diagram-js-direct-editing@3.2.0` ##### Breaking Changes - Require `Node >= 20` - `Canvas` is now a focusable element and provides better support for native browser behaviors. Focus can be controlled with new `focus` and `restoreFocus` APIs. - Keyboard is now implicitly bound to canvas SVG element. Calls to `keyboard.bind` and `keyboard.bindTo` now result with a descriptive console error and have no effect. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/camunda/camunda). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
If canvas for whatever reason is not focused, then movement does not happen. Related to #662
If canvas for whatever reason is not focused, then movement does not happen. Related to #662
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` -> `18.1.2`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/bpmn-js/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/bpmn-js/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/bpmn-js/17.11.1/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/bpmn-js/17.11.1/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bpmn-io/bpmn-js (bpmn-js)</summary> ### [`v18.1.2`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1812) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.1...v18.1.2) - `FIX`: canvas `autoFocus` must explicitly be enabled ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) - `FIX`: properly integrate `zoomscroll` with canvas focus ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) - `FIX`: properly integrate `movecanvas` with canvas focus ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) ### [`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1) - `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953)) - `FIX`: ignore whitespace when searching ([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954)) ### [`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0) - `FIX`: clear selection when opening search pad ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `FIX`: correct dangling selection after search pad interaction ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `DEPS`: update to `diagram-js@15.2.2` ### [`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0) - `FEAT`: remove `outline` from `Viewer` modules ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FEAT`: make `Canvas` a focusable element ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: implicit keyboard binding ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: integrate with global `search` ([#​2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235)) - `FEAT`: integrate `popup-menu` with `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: find `search` terms across all keys ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: `search` always returns tokens for matched items ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: prevent crash during label adjustment ([#​2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239)) - `FIX`: keep existing loop characteristics when toggling through the replace menu ([#​2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251)) - `FIX`: prevent covering multi selection with black box in `Viewer` ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FIX`: generate types for main entry ([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179)) - `FIX`: correct handling of group name with whitespace only ([#​2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231)) - `DEPS`: update to `bpmn-moddle@9` ([#​2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114)) - `DEPS`: update to `diagram-js@15.1.0` - `DEPS`: update to `diagram-js-direct-editing@3.2.0` ##### Breaking Changes - Require `Node >= 20` - `Canvas` is now a focusable element and provides better support for native browser behaviors. Focus can be controlled with new `focus` and `restoreFocus` APIs. - Keyboard is now implicitly bound to canvas SVG element. Calls to `keyboard.bind` and `keyboard.bindTo` now result with a descriptive console error and have no effect. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled because a matching PR was automerged previously. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/camunda/camunda). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS42OS4zIiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` -> `18.1.2`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/bpmn-js/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/bpmn-js/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/bpmn-js/17.11.1/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/bpmn-js/17.11.1/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bpmn-io/bpmn-js (bpmn-js)</summary> ### [`v18.1.2`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1812) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.1...v18.1.2) - `FIX`: canvas `autoFocus` must explicitly be enabled ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) - `FIX`: properly integrate `zoomscroll` with canvas focus ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) - `FIX`: properly integrate `movecanvas` with canvas focus ([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956)) ### [`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1) - `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953)) - `FIX`: ignore whitespace when searching ([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954)) ### [`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0) - `FIX`: clear selection when opening search pad ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `FIX`: correct dangling selection after search pad interaction ([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947)) - `DEPS`: update to `diagram-js@15.2.2` ### [`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800) [Compare Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0) - `FEAT`: remove `outline` from `Viewer` modules ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FEAT`: make `Canvas` a focusable element ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: implicit keyboard binding ([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662)) - `FEAT`: integrate with global `search` ([#​2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235)) - `FEAT`: integrate `popup-menu` with `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: find `search` terms across all keys ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: `search` always returns tokens for matched items ([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932)) - `FIX`: prevent crash during label adjustment ([#​2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239)) - `FIX`: keep existing loop characteristics when toggling through the replace menu ([#​2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251)) - `FIX`: prevent covering multi selection with black box in `Viewer` ([#​2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135)) - `FIX`: generate types for main entry ([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179)) - `FIX`: correct handling of group name with whitespace only ([#​2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231)) - `DEPS`: update to `bpmn-moddle@9` ([#​2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114)) - `DEPS`: update to `diagram-js@15.1.0` - `DEPS`: update to `diagram-js-direct-editing@3.2.0` ##### Breaking Changes - Require `Node >= 20` - `Canvas` is now a focusable element and provides better support for native browser behaviors. Focus can be controlled with new `focus` and `restoreFocus` APIs. - Keyboard is now implicitly bound to canvas SVG element. Calls to `keyboard.bind` and `keyboard.bindTo` now result with a descriptive console error and have no effect. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled because a matching PR was automerged previously. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/camunda/camunda). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS42OS4zIiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
# Changes Siehe Changelog: https://github.com/bpmn-io/bpmn-js/blob/develop/CHANGELOG.md ## 18.1.2 * `FIX`: canvas `autoFocus` must explicitly be enabled ([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956)) * `FIX`: properly integrate `zoomscroll` with canvas focus ([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956)) * `FIX`: properly integrate `movecanvas` with canvas focus ([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956)) ## 18.1.1 * `FIX`: adjust search to prioritize start of word and exact matches ([bpmn-io/diagram-js#953](bpmn-io/diagram-js#953)) * `FIX`: ignore whitespace when searching ([bpmn-io/diagram-js#954](bpmn-io/diagram-js#954)) ## 18.1.0 * `FIX`: clear selection when opening search pad ([bpmn-io/diagram-js#947](bpmn-io/diagram-js#947)) * `FIX`: correct dangling selection after search pad interaction ([bpmn-io/diagram-js#947](bpmn-io/diagram-js#947)) * `DEPS`: update to `diagram-js@15.2.2` ## 18.0.0 * `FEAT`: remove `outline` from `Viewer` modules ([bpmn-io#2135](bpmn-io#2135)) * `FEAT`: make `Canvas` a focusable element ([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)) * `FEAT`: implicit keyboard binding ([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)) * `FEAT`: integrate with global `search` ([bpmn-io#2235](bpmn-io#2235)) * `FEAT`: integrate `popup-menu` with `search` ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FEAT`: recognize modern `search` tokens in `search-pad` ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FIX`: correctly handle duplicate entries and whitespace in `search` ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FIX`: find `search` terms across all keys ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FIX`: `search` always returns tokens for matched items ([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932)) * `FIX`: prevent crash during label adjustment ([bpmn-io#2239](bpmn-io#2239)) * `FIX`: keep existing loop characteristics when toggling through the replace menu ([bpmn-io#2251](bpmn-io#2251)) * `FIX`: prevent covering multi selection with black box in `Viewer` ([bpmn-io#2135](bpmn-io#2135)) * `FIX`: generate types for main entry ([`986e2bb`](bpmn-io@986e2bb)) * `FIX`: correct handling of group name with whitespace only ([bpmn-io#2231](bpmn-io#2231)) * `DEPS`: update to `bpmn-moddle@9` ([bpmn-io#2114](bpmn-io#2114)) * `DEPS`: update to `diagram-js@15.1.0` * `DEPS`: update to `diagram-js-direct-editing@3.2.0` ### Breaking Changes * Require `Node >= 20` * `Canvas` is now a focusable element and provides better support for native browser behaviors. Focus can be controlled with new `focus` and `restoreFocus` APIs ([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)). * Keyboard is now implicitly bound to canvas SVG element. Calls to `keyboard.bind` and `keyboard.bindTo` now result with a descriptive console error and have no effect ([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)). ## 17.11.1 * `FIX`: handle searching elements without labels ([bpmn-io#2232](bpmn-io#2232), [bpmn-io#2234](bpmn-io#2234)) ## 17.11.0 * `FEAT`: align search styles with other popups ([bpmn-io#2187](bpmn-io#2187)) * `FEAT`: prioritize start of tokens in search results ([bpmn-io#2187](bpmn-io#2187)) * `FIX`: do not commit viewport changes on `ESC` ([bpmn-io#2189](bpmn-io#2189), [bpmn-io#2187](bpmn-io#2187)) * `DEPS`: update to `diagram-js@14.10.0` ## 17.10.0 * `CHORE`: correct various type hints ([bpmn-io#2228](bpmn-io#2228)) * `FIX`: pasting compensation activity without boundary event ([bpmn-io#2070](bpmn-io#2070)) * `FIX`: lane resize constraints for se and nw direction ([bpmn-io#2209](bpmn-io#2209)) * `FIX`: auto place elements vertically in sub-processes ([bpmn-io#2127](bpmn-io#2127)) * `FIX`: hide lane label during direct editing * `DEPS`: update to `diagram-js@14.9.0` ## 17.9.2 * `FIX`: keep direction when collapsing pools ([bpmn-io#2208](bpmn-io#2208))
Proposed Changes
Keyboard is now implicitly bound and
Canvas
is a focusable element.This builds foundations to support cross-browser/application copy and paste and more general keyboard related UX enhancements.
This change introduces a predictable editing experience, simplifies the keyboard and ensures worry free interoperability with multiple editors and inputs on the page.
Focusable Canvas (c75285b)
The
Canvas
is now a focusable component, that is recognized accordingly by the browser, with all benefits for UX and interaction. New APIs are provided to allow restoring focus to the canvas.Components that pull focus from the
Canvas
during modeling must ensure to restore the focus (if intended), viaCanvas#restoreFocus
.Implicit Keyboard binding (b0f9a75)
Keyboard is now implicitly bound to the canvas element (svg). It provides behavior closer to native browser experience.
Previous calls to
keyboard.bind(someElement)
or configuration viakeyboard.bindTo
log a descriptive descriptive error:Closes #661