Giter Site home page Giter Site logo

bemto-input's People

Contributors

kizu avatar

Watchers

 avatar

bemto-input's Issues

re-implement `autoFocus`

It seems that there can be various issues with it, I wonder if we can re-implenent it by calling .focus() on the controller on componentDidUpdate if the autoFocus prop is present (while not rendering it in the html)

Font-size & mobile

Right now the font-size is inherited. However, there is a chance its better to make it 16px, in order for it to never be smaller by default.

Though, there are also other issues with everything for the font to be inherited, like for serif fonts its unlikely we'd want to have inputs with serif fonts as well?

However, probably all of that shouldn't be changed, thus being less opinionated. But if so, the mention of the font-size issue could be added to styling notes.

iOS & scrolling page starting from inputs

There is an obscure behavior in iOS where if we have an input inside a scrollbox, then scrolling the page by starting the drag from the input element would scroll the topmost scrollbox instead of a target one. This can be sometimes be fixed by adding -webkit-overflow-scrolling: touch; on the scrollbox, but this fix can introduce more bugs if the scrollbox is positioned inside the iframe.

We can somewhat fix this by hiding the input's controller from the events using pointer-events: none;, but only while the input is not focused. As we always have a wrapping label in our implementation, it won't interfere with anything for iOS, and we can ensure this won't affect desktop by wrapping the fix in pointer @media.

The fix would look then like this:

@media (pointer: coarse) {
  &:not(&_focus) &__Controller {
    pointer-events: none;
  }
}

We need to test some more edge-cases, but for now this should work.

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.