Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondrej Krajcik committed May 4, 2023
1 parent 2dc3ca6 commit 47a9f95
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-chat-widget",
"version": "3.1.85",
"version": "3.1.86",
"description": "Chat web widget for React apps",
"repository": "[email protected]:Wolox/react-chat-widget.git",
"author": "Martín Callegari <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,23 @@ function Sender({
const isPressEnterOnDesktop = event.charCode == 13 && !event.shiftKey && !isMobile;

if (isPressEnterOnDesktop) {
alert('ENTER NA DESKTOPU');
alert(globalThis.window.innerWidth);
// press enter
if (!disableSendSubmit) {
event.preventDefault()
handlerSendMessage();
}
} else if ((event.charCode === 13 && event.shiftKey) || (event.charCode === 13 && isMobile) || (event.key === 'Enter' && isMobile)) {
alert('ENTER NA MOBILU');
event.preventDefault()
insertNodeAtCaret(el);
setEnter(true)
} else {
alert('ENTER NEBYL DETEKOVAN');
alert(event.charCode);
alert(isMobile);
alert(globalThis.window.innerWidth);
}
}

Expand Down

0 comments on commit 47a9f95

Please sign in to comment.