olifolkerd / tabulator

Interactive Tables and Data Grids for JavaScript
http://tabulator.info
MIT License
6.74k stars 817 forks source link

Tabulator textarea losing focus on every key press #3176

Closed Danyshman closed 3 years ago

Danyshman commented 3 years ago

Describe the bug Tabulator textarea losing focus on every key press

Tabulator Info

Working Example https://jsfiddle.net/3L56u79a/

To Reproduce A step by step guide to recreate the issue in your JS Fiddle or Codepen:

  1. Try to edit column TA Test
  2. Every time you will try to edit the cell, it will lose focus from cell

Expected behavior Do not lose focus when editing textarea and when pressing enter it shouldn't lose focus too.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

olifolkerd commented 3 years ago

This is because your table is misconfigured.

if you want the table to resize to the data, do not set a height on the table and disable the virtual DOM in the setup options:

var table = new Tabulator("#example-table", {
    virtualDom:false, //disable virtual DOM rendering
});

This is happeneing because you have the table set to 100% height, but by default the body/html elements of a page match the size of the elements they contain not the page.

Cheers

Oli :)

Danyshman commented 3 years ago

Thank you!