@limetech/lime-elements 37.69.0 → 37.69.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [37.69.1](https://github.com/Lundalogik/lime-elements/compare/v37.69.0...v37.69.1) (2024-11-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **text-editor:** make sure trigger characters work on Android ([940de41](https://github.com/Lundalogik/lime-elements/commit/940de41c45058a1fba6a92eb0773fd53e7edf6c9)), closes [Lundalogik/crm-feature#4470](https://github.com/Lundalogik/crm-feature/issues/4470)
8
+
1
9
  ## [37.69.0](https://github.com/Lundalogik/lime-elements/compare/v37.68.0...v37.69.0) (2024-11-20)
2
10
 
3
11
 
@@ -26268,14 +26268,19 @@ const createTriggerPlugin = (triggerCharacters) => {
26268
26268
  triggerPosition = null;
26269
26269
  activeTrigger = null;
26270
26270
  };
26271
- const handleKeyDown = (view, event) => {
26272
- const { state } = view;
26271
+ const handleKeyDown = (_, event) => {
26273
26272
  if (event.key === 'Escape') {
26274
26273
  stopTrigger();
26275
26274
  return true;
26276
26275
  }
26277
- if (isTrigger(event.key, triggerCharacters) && shouldTrigger(state)) {
26278
- activeTrigger = event.key;
26276
+ return false;
26277
+ };
26278
+ const handleInput = (view, event) => {
26279
+ const { state } = view;
26280
+ if (event.inputType === 'insertText' &&
26281
+ isTrigger(event.data, triggerCharacters) &&
26282
+ shouldTrigger(state)) {
26283
+ activeTrigger = event.data;
26279
26284
  triggerText = '';
26280
26285
  triggerPosition = state.selection.$from.pos - triggerText.length;
26281
26286
  sendTriggerEvent('triggerStart', view, activeTrigger, triggerText);
@@ -26315,6 +26320,9 @@ const createTriggerPlugin = (triggerCharacters) => {
26315
26320
  },
26316
26321
  props: {
26317
26322
  handleKeyDown: handleKeyDown,
26323
+ handleDOMEvents: {
26324
+ input: handleInput,
26325
+ },
26318
26326
  },
26319
26327
  appendTransaction: appendTransactions,
26320
26328
  });