react-input-emoji 5.1.0 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -1
- package/dist/index.es.js +6 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -772,7 +772,7 @@ function removeHtmlExceptBr(inputDiv) {
|
|
772
772
|
|
773
773
|
var stripped = temp.replace(/<[^>]+>/g, ''); // strip all html tags
|
774
774
|
|
775
|
-
var _final = stripped.replace(/\[BR\]/gi, '
|
775
|
+
var _final = stripped.replace(/\[BR\]/gi, '</br>'); // replace placeholders with <br>
|
776
776
|
|
777
777
|
|
778
778
|
return _final;
|
@@ -1054,13 +1054,13 @@ var TextInput = function TextInput(_ref, ref) {
|
|
1054
1054
|
|
1055
1055
|
function handleKeyDown(event) {
|
1056
1056
|
if (event.key === "Enter" && (event.shiftKey === true || event.ctrlKey === true) && props.shouldReturn) {
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1057
|
+
event.preventDefault();
|
1058
|
+
|
1059
|
+
if (textInputRef.current) {
|
1060
|
+
textInputRef.current.innerHTML = "".concat(textInputRef.current.innerHTML, "</br></br>");
|
1060
1061
|
moveCaretToEnd(textInputRef);
|
1062
|
+
return;
|
1061
1063
|
}
|
1062
|
-
|
1063
|
-
return;
|
1064
1064
|
}
|
1065
1065
|
|
1066
1066
|
if (event.key === "Enter") {
|