Skip to content

Commit

Permalink
remove build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh-couchbase committed Jan 30, 2024
1 parent 900e837 commit 1417960
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/reactViews/iq/pages/chatscreen/IqChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,20 +255,22 @@ const IqChat = ({ org, setIsLoading }) => {
);
};

const handlePaste = (event) => {
// Prevent the original paste action
event.preventDefault();
const text = event.clipboardData.getData("text/plain");
const selection = window.getSelection();

if (selection.rangeCount) {
selection.deleteFromDocument();
selection.getRangeAt(0).insertNode(document.createTextNode(text));
}

const inputEvent = new Event("input", { bubbles: true });
event.target.dispatchEvent(inputEvent);
};
// Keeping the handle paste function here if some paste issue arises later
// const handlePaste = (event) => {
// // Prevent the original paste action
// event.preventDefault();
// const text = event.clipboardData.getData("text/plain");
// const selection = window.getSelection();

// if (selection.rangeCount) {
// selection.deleteFromDocument();
// selection.getRangeAt(0).insertNode(document.createTextNode(text));
// }

// const inputEvent = new Event("input", { bubbles: true });
// event.target.dispatchEvent(inputEvent);
// };

const openNewChat = () => {
setMessages({
Expand Down

0 comments on commit 1417960

Please sign in to comment.