Copying text outside of the table

Tags: #<Tag:0x00007f8b1d7a6f20>

Hi,

updated to the version 14 recently and noticed a problem that we did not have before and could not find any existing related threads about it. In our case we have a text a user needs to copy on a same view that out table is on.

Currently if the user clicks the table before trying to copy the text, they will end up copying the cells rather than the text content. See the following fiddle. Some amount of clicking and recopying and pasting seems to work with fiddle, but would be nice to get it to work on the first try. This happens although the outsideClickDeselects is on, if that matters. https://jsfiddle.net/mikkosk/gt9m1xdr/15/

As a workaround I disabled the plugin on deselect for now, like

       afterSelection={() => {
        tableElement.current?.hotInstance.updateSettings({
          copyPaste: true,
        });
      }}
      afterDeselect={() => {
        const selected = tableElement.current?.hotInstance.getSelected();
        if (!selected) {
          tableElement.current?.hotInstance.updateSettings({
            copyPaste: false,
          });
        }
      }}

Has this changed lately or am I possibly missing something to get this work without?

Thanks in advance!

Hi @Mikkosk

That’s an interesting case and you’re right that is definitely a regression.

I will report it to the team and update you as soon as we fix it.

1 Like

Hi @Mikkosk

I am more than happy to announce that this issue is fixed.

We released it in Handsontable v14.1.0

Please feel free to read more about the changes on our blog https://handsontable.com/blog/handsontable-14-1-0-typescript-ssr-improvements

1 Like