InputText autoStretchWidth not working

I’m trying to get the InputText autoStretchWidth to work, but I can’t seem to.
https://playground.babylonjs.com/#00ZP2B

I would expect the input to grow until it fills the container, but it doesn’t. From what I understand the properties I have set are default, but I have set them to make sure.

Let me take a look :slight_smile:

1 Like

So I’m not sure if this is the intended design or a bug.

https://playground.babylonjs.com/#UWS0TS#169

if we look at this example it adjusts the scale to match the text (as opposed to 10px i set it too) Now what it’s not doing is updating in real time as you update the text. In my opinion that is what I would expect it to do but at least this gives some context to what is happening.

1 Like

I think it’s a bug, here’s a PR that will fix the problem:

5 Likes

Cheers. I’ll update when a new version gets pushed to npm. I looked at the fix and this workaround works fine for now:
https://playground.babylonjs.com/#00ZP2B#2