Skip to content

Commit

Permalink
fix(context): strip hidden special chars on context menu Copy command
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Nov 9, 2021
1 parent f94ca83 commit 5d81644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/src/extensions/slickContextMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export class SlickContextMenu extends MenuFromCellBaseClass<ContextMenu> {
}

// remove any unwanted Tree Data/Grouping symbols from the beginning of the string before copying (e.g.: "⮟ Task 21" or "· Task 2")
const finalTextToCopy = textToCopy.replace(/^([\u00b7|\u034f|·||]\s*)|([·||])\s*/gi, '').replace(/[\u00b7|\u034f]/gi, '').trim();
const finalTextToCopy = textToCopy.replace(/^([·||]\s*)|([·||])\s*/gi, '').replace(/[\u00b7|\u034f]/gi, '').trim();

// create fake <textarea> (positioned outside of the screen) to copy into clipboard & delete it from the DOM once we're done
const tmpElem = document.createElement('textarea') as HTMLTextAreaElement;
Expand Down

0 comments on commit 5d81644

Please sign in to comment.