From 39b883fdcaae7de924570db2d8feb99aff12e56a Mon Sep 17 00:00:00 2001 From: azmy60 Date: Tue, 11 Jun 2024 14:48:16 +0700 Subject: [PATCH] fix navigation conflict with SelectRange and Edit --- src/js/modules/Edit/Edit.js | 25 +++++++++++++++++++++++ src/js/modules/SelectRange/SelectRange.js | 1 + 2 files changed, 26 insertions(+) diff --git a/src/js/modules/Edit/Edit.js b/src/js/modules/Edit/Edit.js index c69786a16..914fbfb49 100644 --- a/src/js/modules/Edit/Edit.js +++ b/src/js/modules/Edit/Edit.js @@ -178,6 +178,10 @@ export default class Edit extends Module{ if(cell){ + if(cell.column.modules.edit.navigationBlocked){ + return false; + } + if(e){ e.preventDefault(); } @@ -208,6 +212,10 @@ export default class Edit extends Module{ if(cell){ + if(cell.column.modules.edit.navigationBlocked){ + return false; + } + if(e){ e.preventDefault(); } @@ -238,6 +246,10 @@ export default class Edit extends Module{ if(cell){ + if(cell.column.modules.edit.navigationBlocked){ + return false; + } + if(e){ e.preventDefault(); } @@ -259,6 +271,10 @@ export default class Edit extends Module{ if(cell){ + if(cell.column.modules.edit.navigationBlocked){ + return false; + } + if(e){ e.preventDefault(); } @@ -280,6 +296,10 @@ export default class Edit extends Module{ if(cell){ + if(cell.column.modules.edit.navigationBlocked){ + return false; + } + if(e){ e.preventDefault(); } @@ -301,6 +321,10 @@ export default class Edit extends Module{ if(cell){ + if(cell.column.modules.edit.navigationBlocked){ + return false; + } + if(e){ e.preventDefault(); } @@ -401,6 +425,7 @@ export default class Edit extends Module{ convertEmptyValues:convertEmpty, editorEmptyValue:column.definition.editorEmptyValue, editorEmptyValueFunc:column.definition.editorEmptyValueFunc, + navigationBlocked: false, }; //set column editor diff --git a/src/js/modules/SelectRange/SelectRange.js b/src/js/modules/SelectRange/SelectRange.js index 84c01e718..42b832f2b 100644 --- a/src/js/modules/SelectRange/SelectRange.js +++ b/src/js/modules/SelectRange/SelectRange.js @@ -146,6 +146,7 @@ export default class SelectRange extends Module { // Block editor from taking action so we can trigger edit by // double clicking. // column.modules.edit.blocked = true; + column.modules.edit.navigationBlocked = true; } }