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.es.js
CHANGED
|
@@ -874,7 +874,7 @@ var TextInput = function TextInput(_ref, ref) {
|
|
|
874
874
|
if (textInputRef.current) {
|
|
875
875
|
textInputRef.current.focus();
|
|
876
876
|
}
|
|
877
|
-
if (textInputRef.current && placeholderRef.current && textInputRef.current.innerHTML
|
|
877
|
+
if (textInputRef.current && placeholderRef.current && replaceAllTextEmojiToString(textInputRef.current.innerHTML) === "") {
|
|
878
878
|
placeholderRef.current.style.visibility = "visible";
|
|
879
879
|
} else if (placeholderRef.current) {
|
|
880
880
|
placeholderRef.current.style.visibility = "hidden";
|
|
@@ -888,7 +888,8 @@ var TextInput = function TextInput(_ref, ref) {
|
|
|
888
888
|
textInputRef.current.innerHTML = value;
|
|
889
889
|
}
|
|
890
890
|
if (placeholderRef.current) {
|
|
891
|
-
|
|
891
|
+
var text = replaceAllTextEmojiToString(value);
|
|
892
|
+
if (text === "") {
|
|
892
893
|
placeholderRef.current.style.visibility = "visible";
|
|
893
894
|
} else {
|
|
894
895
|
placeholderRef.current.style.visibility = "hidden";
|
|
@@ -969,9 +970,9 @@ var TextInput = function TextInput(_ref, ref) {
|
|
|
969
970
|
function handleKeyUp(event) {
|
|
970
971
|
props.onKeyUp(event);
|
|
971
972
|
var input = textInputRef.current;
|
|
972
|
-
if (placeholderRef.current) {
|
|
973
|
-
var
|
|
974
|
-
if (
|
|
973
|
+
if (placeholderRef.current && input) {
|
|
974
|
+
var text = replaceAllTextEmojiToString(input.innerHTML);
|
|
975
|
+
if (text === "") {
|
|
975
976
|
placeholderRef.current.style.visibility = "visible";
|
|
976
977
|
} else {
|
|
977
978
|
placeholderRef.current.style.visibility = "hidden";
|