@innovastudio/contentbuilder 1.5.183 → 1.5.184

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.5.183",
4
+ "version": "1.5.184",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -97165,20 +97165,21 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
97165
97165
 
97166
97166
  // Undo Redo
97167
97167
  document.addEventListener('keydown', this.doDocumentKeydown = e => {
97168
- if (e.which === 90 && (e.ctrlKey || e.metaKey)) {
97169
- //CTRL-Z
97170
- if (e.shiftKey) this.uo.doRedo();else {
97171
- if (!e.altKey) {
97172
- //if(!document.queryCommandEnabled('undo')){
97173
- this.uo.doUndo();
97174
- //}
97168
+ const activeElement = document.activeElement;
97169
+ const isInputElement = activeElement && (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA');
97170
+ if (!isInputElement) {
97171
+ if (e.which === 90 && (e.ctrlKey || e.metaKey)) {
97172
+ //CTRL-Z
97173
+ if (e.shiftKey) this.uo.doRedo();else {
97174
+ if (!e.altKey) {
97175
+ this.uo.doUndo();
97176
+ }
97175
97177
  }
97176
97178
  }
97177
- }
97178
-
97179
- if (e.which === 89 && e.ctrlKey) {
97180
- //CTRL-Y
97181
- if (!e.altKey) this.uo.doRedo();
97179
+ if (e.which === 89 && e.ctrlKey) {
97180
+ //CTRL-Y
97181
+ if (!e.altKey) this.uo.doRedo();
97182
+ }
97182
97183
  }
97183
97184
  const isCmd = e.ctrlKey || e.metaKey;
97184
97185
  if (isCmd && e.which === 191) {