react-input-emoji 5.6.1 → 5.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +6 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -882,7 +882,7 @@ var TextInput = function TextInput(_ref, ref) {
|
|
|
882
882
|
if (textInputRef.current) {
|
|
883
883
|
textInputRef.current.focus();
|
|
884
884
|
}
|
|
885
|
-
if (textInputRef.current && placeholderRef.current && textInputRef.current.innerHTML
|
|
885
|
+
if (textInputRef.current && placeholderRef.current && replaceAllTextEmojiToString(textInputRef.current.innerHTML) === "") {
|
|
886
886
|
placeholderRef.current.style.visibility = "visible";
|
|
887
887
|
} else if (placeholderRef.current) {
|
|
888
888
|
placeholderRef.current.style.visibility = "hidden";
|
|
@@ -896,7 +896,8 @@ var TextInput = function TextInput(_ref, ref) {
|
|
|
896
896
|
textInputRef.current.innerHTML = value;
|
|
897
897
|
}
|
|
898
898
|
if (placeholderRef.current) {
|
|
899
|
-
|
|
899
|
+
var text = replaceAllTextEmojiToString(value);
|
|
900
|
+
if (text === "") {
|
|
900
901
|
placeholderRef.current.style.visibility = "visible";
|
|
901
902
|
} else {
|
|
902
903
|
placeholderRef.current.style.visibility = "hidden";
|
|
@@ -977,9 +978,9 @@ var TextInput = function TextInput(_ref, ref) {
|
|
|
977
978
|
function handleKeyUp(event) {
|
|
978
979
|
props.onKeyUp(event);
|
|
979
980
|
var input = textInputRef.current;
|
|
980
|
-
if (placeholderRef.current) {
|
|
981
|
-
var
|
|
982
|
-
if (
|
|
981
|
+
if (placeholderRef.current && input) {
|
|
982
|
+
var text = replaceAllTextEmojiToString(input.innerHTML);
|
|
983
|
+
if (text === "") {
|
|
983
984
|
placeholderRef.current.style.visibility = "visible";
|
|
984
985
|
} else {
|
|
985
986
|
placeholderRef.current.style.visibility = "hidden";
|