Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up copy/pasting of tabular content in EuiDataGrid and EuiBasic/InMemoryTable #8019

Merged
merged 14 commits into from
Sep 23, 2024
Merged
2 changes: 1 addition & 1 deletion packages/eui/src/services/copy/tabular_copy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const OverrideCopiedTabularContent = ({
// Chrome and webkit browsers work perfectly when passing `onTabularCopy` to a React
// `onCopy` prop, but sadly Firefox does not if copying more than just the table/grid
// (e.g. Ctrl+A). So we have to set up a global window event listener
window.addEventListener('copy', onTabularCopy);
window.document.addEventListener('copy', onTabularCopy);
mgadewoll marked this conversation as resolved.
Show resolved Hide resolved
// Note: Since onCopy is static, we don't have to worry about duplicate
// event listeners - it's automatically handled by the browser. See:
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Multiple_identical_event_listeners
Expand Down