Skip to content

Multiple copy/paste issues: can’t copy/paste on non-qwerty keybords, and can’t copy in some firefox instances #399

Description

@tobiasBora

Describe the issue
Copy/paste is really not working nicely on my system for multiple reasons:

  1. if I use a non-azerty or qwerty keybord (e.g. bépo), then I can’t copy/past at all, on any demo, like this one: when I press Ctrl-C, it tries to edit the cell instead of copy/pasting… but weirdly enough, pasting works when run inside codesandbox, like https://codesandbox.io/s/revogrid-react-g3ygo?from-embed (but copying fails, see next error)
  2. even if I move back to azerty, then I can’t copy (but I can paste) on firefox as I get an error (note that on chromium, this works fine, but bug 1 is still present):
NoModificationAllowedError
Modifications are not allowed for this document
▼ 7 stack frames were expanded.
$csb$eval/e.prototype.doCopy/</<@https://nrz0f.csb.app/node_modules/
revolist/revogrid/dist/esm-es5/revo-grid_12.entry.js:9689:11
l@https://nrz0f.csb.app/node_modules/
revolist/revogrid/dist/esm-es5/revo-grid_12.entry.js:209:13
s/<@https://nrz0f.csb.app/node_modules/
revolist/revogrid/dist/esm-es5/revo-grid_12.entry.js:158:14
$csb$eval/__awaiter</<@https://nrz0f.csb.app/node_modules/
revolist/revogrid/dist/esm-es5/revo-grid_12.entry.js:136:33
$csb$eval/__awaiter<@https://nrz0f.csb.app/node_modules/
revolist/revogrid/dist/esm-es5/revo-grid_12.entry.js:118:10
$csb$eval/e.prototype.doCopy@https://nrz0f.csb.app/node_modules/
revolist/revogrid/dist/esm-es5/revo-grid_12.entry.js:9687:12
value/<@https://nrz0f.csb.app/node_modules/
revolist/revogrid/dist/esm-es5/index-c7c8ae92.js:1338:48
▲ 7 stack frames were expanded.

this error is however not always present: for instance the demo here works, but I get this error when I go to https://codesandbox.io/s/revogrid-react-component-hrgrx?from-embed=&file=/src/App.js or if I locally run the code in the next section:

To Reproduce

This bug is present on all examples I can come up with, for instance:

import React, { useEffect, useState } from "react";
import { defineCustomElements } from "@revolist/revogrid/loader";
import { RevoGrid } from "@revolist/revogrid-react";

const App = () => {
  defineCustomElements();
    const [columns, setColumns] = useState([{ prop: "name" }, { prop: "age" }]);
    const [source, setSource] = useState([{ name: "1", age: 42 }, { name: "2", age: 48 }]);

  const afterEdit = ({ detail }) => {
      
  };

  useEffect(() => {
    // Votre logique d'effet ici, si nécessaire
  }, []);

  return (
    <div>
      <RevoGrid
        theme="compact"
        columns={columns}
        source={source}
          onAfterEdit={(e) => afterEdit(e)}
          canFocus={true}
          range={true}
          useClipboard={true}
          readonly={false}
          filter={true}
          resize={true}
      />
    </div>
  );
};

export default App;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglowMinor improvement/issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions