Override keyboard shortcut Tab & Shift+Tab when inside a table

How do I move to next column when I'm pressing Tab & Shift+Tab:

If for example my text cursor is in first column of table.
I want to be able to move to next column by pressing Tab and move back when pressing Shift+Tab.


So I have these code written already:

documentEditor.keyDown =  (args: any): void => {
    ... some codes here

   ... some codes here
}


12 Replies 1 reply marked as answer

SM Suriya Murugan Syncfusion Team June 21, 2022 04:02 PM UTC

Hi Min,


Normally, TAB and shift + Tab navigate between cell. Can you please confirm do you want to override the existing functionality? if yes, please refer documentation for key override.


https://ej2.syncfusion.com/react/documentation/document-editor/how-to/override-the-keyboard-shortcuts/


Please let us know if you need any further assistance.


Regards,

Suriya M.



AK Ameer Khalaf replied to Suriya Murugan June 27, 2022 06:43 AM UTC

Hi Suriya,


Yeah ideally TAB & SHIFT + TAB within table should work out of the box from syncfusion right?
But currently it does not work on our end. What do you think maybe causing this?
Are we missing something? Like some configuration from document editor?

This is the current version we are using:




SM Suriya Murugan Syncfusion Team June 29, 2022 07:46 AM UTC

Hi Min,


Currently, we are validating and will update details by June 30, 2022.


Regards,

Suriya M.



SM Suriya Murugan Syncfusion Team June 30, 2022 01:14 PM UTC

Hi Saam,


We have confirmed the reported issue as a defect and logged a defect report. We will fix this issue and include it in our EJ2 patch release which is scheduled for June 13, 2022.  


You can track the status of the bug through the below feedback link:


https://www.syncfusion.com/feedback/34585/cursor-is-not-placed-on-first-click-when-click-the-inside-and-outside-table


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

Suriya M.



AE Ajithamarlin Edward Syncfusion Team July 4, 2022 12:47 PM UTC

Hi Min,


Please ignore previous update.


We have confirmed the reported issue as a defect and logged a defect report. We will fix this issue and include it in our EJ2 patch release which is scheduled for July 13, 2022.  


You can track the status of the bug through the below feedback link:


https://www.syncfusion.com/feedback/34585/cursor-is-not-placed-on-first-click-when-click-the-inside-and-outside-table


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

Ajithamarlin E



AE Ajithamarlin Edward Syncfusion Team July 13, 2022 10:20 AM UTC

HI Min,


We are glad to announce that our patch release (v20.2.38) is rolled out successfully. In this release, we have added the fix for the reported issue. 


Please upgrade to the latest version packages to resolve this issue.     

https://www.npmjs.com/package/@syncfusion/ej2-documenteditor   

https://www.npmjs.com/package/@syncfusion/ej2-react-documenteditor


Release notes:  https://ej2.syncfusion.com/documentation/release-notes/20.2.38/#document-editor


Please let us know if you need any further assistance.


Regards,

Ajithamarlin E




AK Ameer Khalaf July 25, 2022 02:19 AM UTC

HiAjithamarlin Edward, I just tested this today, it doesn't seem to work.

here's the version I'm working with:

    "@syncfusion/ej2-base": "20.2.39",
    "@syncfusion/ej2-buttons": "20.2.38",
    "@syncfusion/ej2-dropdowns": "20.2.39",
    "@syncfusion/ej2-inputs": "20.2.38",
    "@syncfusion/ej2-lists": "20.2.39",
    "@syncfusion/ej2-navigations": "20.2.39",
    "@syncfusion/ej2-popups": "20.2.39",
    "@syncfusion/ej2-react-base": "20.2.38",
    "@syncfusion/ej2-react-documenteditor": "20.2.39",
    "@syncfusion/ej2-react-inputs": "20.2.38",
    "@syncfusion/ej2-splitbuttons": "20.2.38",


here's my sample code:

import React, { FunctionComponent, ReactElement, useRef } from 'react';
import {
  DocumentEditorComponent,
  Print,
  SfdtExport,
  WordExport,
  TextExport,
  Selection,
  Search,
  Editor,
  ImageResizer,
  EditorHistory,
  ContextMenu,
  OptionsPane,
  HyperlinkDialog,
  TableDialog,
  BookmarkDialog,
  TableOfContentsDialog,
  PageSetupDialog,
  StyleDialog,
  ListDialog,
  ParagraphDialog,
  BulletsAndNumberingDialog,
  FontDialog,
  TablePropertiesDialog,
  BordersAndShadingDialog,
  TableOptionsDialog,
  CellOptionsDialog,
  StylesDialog
} from '@syncfusion/ej2-react-documenteditor';
DocumentEditorComponent.Inject(
  Print,
  SfdtExport,
  WordExport,
  TextExport,
  Selection,
  Search,
  Editor,
  ImageResizer,
  EditorHistory,
  ContextMenu,
  OptionsPane,
  HyperlinkDialog,
  TableDialog,
  BookmarkDialog,
  TableOfContentsDialog,
  PageSetupDialog,
  StyleDialog,
  ListDialog,
  ParagraphDialog,
  BulletsAndNumberingDialog,
  FontDialog,
  TablePropertiesDialog,
  BordersAndShadingDialog,
  TableOptionsDialog,
  CellOptionsDialog,
  StylesDialog
);

const TestPage: FunctionComponent = (): ReactElement => {
  const documentEditorRef = useRef<DocumentEditorComponent>(null);

  const insertTable = (): void => {
    documentEditorRef.current!.editor.insertTable(10, 10);
  };

  return (
    <>
      <div>
        <button onClick={insertTable}>Insert Table</button>
      </div>
      <DocumentEditorComponent
        ref={documentEditorRef}
        id='container'
        height='830px'
        isReadOnly={false}
        enablePrint={true}
        enableSelection={true}
        enableEditor={true}
        enableEditorHistory={true}
        enableContextMenu={true}
        enableSearch={true}
        enableOptionsPane={true}
        enableBookmarkDialog={true}
        enableBordersAndShadingDialog={true}
        enableFontDialog={true}
        enableTableDialog={true}
        enableParagraphDialog={true}
        enableHyperlinkDialog={true}
        enableImageResizer={true}
        enableListDialog={true}
        enablePageSetupDialog={true}
        enableSfdtExport={true}
        enableStyleDialog={true}
        enableTableOfContentsDialog={true}
        enableTableOptionsDialog={true}
        enableTablePropertiesDialog={true}
        enableTextExport={true}
        enableWordExport={true}
      />
    </>
  );
};

export default TestPage;



SM Suriya Murugan Syncfusion Team July 26, 2022 03:52 AM UTC

Hi Min,


Please check the reported issue in below stackblitz and let us know you can replicate the issue in below link also.


https://stackblitz.com/edit/react-zxjogz?file=index.js


Regards,

Suriya M.



AK Ameer Khalaf August 26, 2022 04:26 AM UTC

Hi  Suriya Murugan,

I just tested the link you gave me:
https://stackblitz.com/edit/react-zxjogz?file=index.js

and after further investigation I realized you are using 

DocumentEditorContainerComponent ​while I was using 

DocumentEditorComponent,
 
​and I'm guessing the ability to use tab & shift+tab is not supported on the latter?

I've also tested this in your sample preview UI here in the docs:
https://ej2.syncfusion.com/react/documentation/document-editor/getting-started/

on  DocumentEditorComponent , the tab & shift+tab does not work out of the box 
while it works flawlessly in  DocumentEditorContainerComponent 

Can you confirm if this is the case?
Is this a bug? 



SM Suriya Murugan Syncfusion Team September 1, 2022 03:44 AM UTC

Hi Min,


We will update details shortly.


Regards,

Suriya M.



DS Dhanush Sekar Syncfusion Team September 2, 2022 11:52 AM UTC

Hi Min,


We are able to replicate the reported issue. Currently we are validating this and we will update further details on this by September 6,2022.


Regards,

Dhanush Sekar



DS Dhanush Sekar Syncfusion Team September 2, 2022 01:33 PM UTC

Hi Min,


The tab key in the document editor component is only functional if acceptTab is enabled to true.

Please refer the below sample

https://stackblitz.com/edit/react-mvkma2?file=index.js


Code Snippet 



API Documentation

https://ej2.syncfusion.com/react/documentation/api/document-editor/documentEditorModel/#accepttab


Please let us know if you need any further assistance


Regards,

Dhanush Sekar.



Marked as answer
Loader.
Up arrow icon