Giter VIP home page Giter VIP logo

Comments (12)

anthdm avatar anthdm commented on June 17, 2024 1

We had the exact same issue and fixed it.

  1. box-sizing needs to be initial (default)
  2. You need the comfort zone to be around 25 (for smoothness)
  3. You need that comfort zone to apply before and after the text. (left and right)
    => Set the text align to center to achieve this.

from vue-input-autowidth.

syropian avatar syropian commented on June 17, 2024 1

Thanks for investigating guys, I'm going to play around with it today and see if I can come up with anything.

from vue-input-autowidth.

syropian avatar syropian commented on June 17, 2024

Thanks for the report! Do you have box-sizing: border-box; on that element's css? I'm unable to reproduce in the repo example. Could you copy your example to a JSFiddle or similar?

from vue-input-autowidth.

sdnyco avatar sdnyco commented on June 17, 2024

It's really bizarre. My example is a little too complex to post on jsbin.

However, when building a simple input component in jsbin it works fine (unless I add CSS letter-spacing).

But when I remove all of the styles of my app's component it still flickers.

Even when I remove

html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

from the global CSS.

from vue-input-autowidth.

sdnyco avatar sdnyco commented on June 17, 2024

Addition: On an old project, with no previous problems whatsoever, I just updated vue, vue-loader and vue-template-compiler to their latest versions. Now I have the same problem flicker showing up.

from vue-input-autowidth.

syropian avatar syropian commented on June 17, 2024

Very strange! Almost makes me think it's something funny with Vue's re-rendering code. I'll spend a bit of time seeing if I can reproduce.

from vue-input-autowidth.

sdnyco avatar sdnyco commented on June 17, 2024

Various things seem to exacerbate the problem. With my CodePen I have so far identified letter-spacing, font-size and box-sizing as potential factors.

I was using 2.5.2 of Vue. And again: only problems in Chrome/Safari showing up. Not in Firefox.

from vue-input-autowidth.

syropian avatar syropian commented on June 17, 2024

It's a bit surprising letter-spacing affects it, as I do copy letter-spacing to the clone helper. I have not checked compatibility with the latest version of Vue, so I'll have to do that.

from vue-input-autowidth.

sdnyco avatar sdnyco commented on June 17, 2024

I played with the pen I posted above, and changing box-sizing and text-align: center had no impact whatsoever.

Only increasing the comfortZone to 25 seemed to smoothen things.

from vue-input-autowidth.

lmgonzalves avatar lmgonzalves commented on June 17, 2024

Similar issue here. Tried the workarounds but still having some small flickering.

from vue-input-autowidth.

eNzyOfficial avatar eNzyOfficial commented on June 17, 2024

Same problem, adding comfort zone 20+ fixes it but this is a little too high for me unfortunately

from vue-input-autowidth.

syropian avatar syropian commented on June 17, 2024

I tried in the latest version of Chrome and I wasn't seeing this anymore with the latest version of the package.

from vue-input-autowidth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.