Bug in React-Select? Text vanishes to the left as additional text is added - css

We are not sure if this is an issue with React-Select or simply an issue with our styles that is causing the issue. On our website, when text is typed into any of our (react-select) search bars, the text slowly vanishes to the left as more text is added. On the page linked, in the React-Select search box where it has placeholder text Focus Conferences, we have typed Typing any text to showcase the issue, and here is how it appears. Notice text missing off to the left:
To troubleshoot this issue, we have removed the blur event listener in Chrome Dev Tools so that we can type in the field and then also inspect the field without the text being removed from the search bar. Here are the styles we are seeing on this relevant input. These are all default styles for this input from react-select:
What I've noticed is that changing the width: 100% to width: 120% seems to solve this issue, however, I am not sure how to permanently make the change to 120% in our code. There is no class on this input, which makes it difficult to grab and style from our code or from css. https://react-select.com/styles are the ways to style, but none of the innerComponents seem to be for this input element. Either way, changing the width to 120% also seems like a hacky way to resolve this issue.
What's going on here? Why is the text bleeding off to the left in all of our search bars as more text is typed? We recently upgraded to react-select 5.7, and this issue was not happening previously with version 4. Any help or input is appreciated.

Related

Weird "jump" when typing in styled input field in IE10

I've a website based on Html KickStart and I notice an annoying problem in IE10.
The issue: when you open the web page, the text in the input field is aligned against the left hand side of the field. When you put the focus on it, and start typing, the text jumps to the right (where it is supposed to be, as you can see in other browsers). When the field looses the focus, the text jumps left again, against the side once more. The input field in question is styled.
The problem is clearly visible on the Html KickStart demo site:
http://www.99lime.com/elements/
Here you can also find the css code files etc.
I don't seem to be able to find the cause of this behaviour. Any help would be greatly appreciated.
Check out this css property : https://developer.mozilla.org/en-US/docs/Web/CSS/direction
direction effects the css declaration being used known as text-align:start
which isn't supported by IE 10

No insertion point in styled text input on IE 9 and below

Here's a demo:
http://codepen.io/raddevon/pen/ujwqA
The insertion point is not visible for this styled text input control in versions of IE below 10. The input control otherwise behaves as it should. I can enter text into it despite not being able to see the insertion point. Does anyone know how to fix this problem?
It turned out to be the text-align: right property that causes the insertion point to be invisible in older versions of IE. I override this to text-align: left in my IE stylesheet to fix the problem.

how to fix customize select box using css?

I'm trying to modify a default select box using CSS. I've already done it. But, some problems are happened at firefox. What I've done still now:
It's the perfect result on all browser except firefox and IE
At firefox, there are the problems:
(1) There are an unexpected border on the right side of the select box
(2) Padding of text of select box is much bigger than other input field.
At IE, same problem happened. There are unexpected and much clear box at the right of the select box:
How can I remove that unexpected line/box from firefox and IE. Also, what can be responsible for the padding problem at firefox?
Well, I've used this tutorial's concept to customize the select box using CSS only. And I've put my code at
jsfiddle.net/w9kFc/1/
(I can't add the select-icon image at jsfiddle from external link. So, I've taken the screenshot locally. But, I've given the image's link at the jsfiddle code. )
This seems to work in IE10: jsFiddle
Added a label around the select.
Replaced the text-indent with padding.

Is this a text-indent bug in Chrome and IE, or I am missing something?

http://jsfiddle.net/CtaBe/
I've tested this in FF, Chrome and IE. Only FF shows the intended behavior (or at least what I think is the intended behavior). Chrome and IE show the same behavior: when you first focus on the input, the cursor doesn't indent. After you type somehing, delete it, and re-focus, it indents properly.
How can I fix this? Because I want to display an image at that indented space.
Quick disclaimer: this message outlines a solid example of why a person would choose to use text-indent on an input field rather than padding. It does not answer "how to fix IE handle text-indent on input fields"
The thing about padding-left is that it alters the width of your input field, which can be undesirable.
Imagine a scenario where you wish to show a background-image icon for the following states of your inputs' data:
required field
invalid input
missed required field
password strength
In such a scenario, we'd need to nudge the text away from the left border to display the icon (which is a much simpler feat than going for the right side, but that's a whole other discussion. If we use padding, the width of the input field changes. That's not ideal, since the various "states" can change.
For instance, maybe a field is only required based on the value of another field. When that field "becomes" required the field "grows" according whatever padding we apply to move the text away from the icon, via relevant class. That's far from elegant, especially when other fields are floated next to it.
Furthermore, in the case of textareas, we wouldn't want to pad the entire side - the first line would suffice.
That's exactly where using text-indent comes into play. And it works great - except in Internet explorer. Which is what has led me here, as I search for other ideas or solutions. I have a few ideas in mind but hopefully there's something simpler that I haven't thought of.
In Chrome, this is a known issue. Please star it :)
'text-indent' applies to block-level elements, table cells and inline blocks. I hope you are using it on a not block-level element.

Button Text dissapears using overflow:visible within IE7

In Internet Explorer, there is unnecessary padding that occurs to the left and right within the button when the button name is large. As a result of this, the known solution is to add "width: auto" and "overflow:visible" to the button style, but doing so will inadvertently make the text in the button disappear when the user scrolls the page down and then back up.
I would very much like to use the style I've included so the padding stays removed, but more importantly resolve the issue with the button text disappearing. It's really an odd one!
I've created this DEMO page for you to test the code where it's happening: http://jsbin.com/uhuze3
Note: You'll need IE7 to see the issue, so for those who don't have it, I create this video for you to see the issue. http://screencast.com/t/MTg0NzY2Zj
I was able to resolve this and improve the code a bit.
You can see the code here:
http://jsbin.com/uhuze3/4
This was the old code:
http://jsbin.com/uhuze3
Edit by Johnny5 :
It seem to be the combinaison of "height" and "line-height" that correct the bug.

Resources