diff --git a/frontend/src/components/MessageInput/index.js b/frontend/src/components/MessageInput/index.js index 04e1ac4..07731a5 100644 --- a/frontend/src/components/MessageInput/index.js +++ b/frontend/src/components/MessageInput/index.js @@ -328,7 +328,9 @@ const MessageInput = ({ ticketStatus }) => { value={inputMessage} onChange={handleChangeInput} disabled={recording || loading || ticketStatus !== "open"} - onPaste={handleInputPaste} + onPaste={e => { + ticketStatus === "open" && handleInputPaste(); + }} onKeyPress={e => { if (loading || e.shiftKey) return; else if (e.key === "Enter") { diff --git a/frontend/src/components/Ticket/index.js b/frontend/src/components/Ticket/index.js index a6f37d7..1396f14 100644 --- a/frontend/src/components/Ticket/index.js +++ b/frontend/src/components/Ticket/index.js @@ -385,6 +385,14 @@ const Ticket = () => { }; }, [ticketId, history]); + const handleDrawerOpen = () => { + setDrawerOpen(true); + }; + + const handleDrawerClose = () => { + setDrawerOpen(false); + }; + const handleOpenMessageOptionsMenu = (e, messageId) => { setAnchorEl(e.currentTarget); setSelectedMessageId(messageId); @@ -471,14 +479,6 @@ const Ticket = () => { } }; - const handleDrawerOpen = () => { - setDrawerOpen(true); - }; - - const handleDrawerClose = () => { - setDrawerOpen(false); - }; - const renderMessageAck = message => { if (message.ack === 0) { return ;