We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 011b407 commit 20308c8Copy full SHA for 20308c8
src/TimeInput/Input.jsx
@@ -22,6 +22,18 @@ function onFocus(event) {
22
}
23
24
25
+function updateInputWidthOnLoad(element) {
26
+ if (document.readyState === 'complete') {
27
+ return;
28
+ }
29
+
30
+ function onLoad() {
31
+ updateInputWidth(element);
32
33
34
+ window.addEventListener('load', onLoad);
35
+}
36
37
function updateInputWidthOnFontLoad(element) {
38
if (!document.fonts) {
39
return;
@@ -110,6 +122,7 @@ export default function Input({
110
122
111
123
112
124
updateInputWidth(inputRef.current);
125
+ updateInputWidthOnLoad(inputRef.current);
113
126
updateInputWidthOnFontLoad(inputRef.current);
114
127
}, [inputRef, value]);
115
128
0 commit comments