Giter Site home page Giter Site logo

Comments (7)

i-like-robots avatar i-like-robots commented on May 11, 2024

Thanks for your query @Pomax. Hopefully this has not caused anybody any issues - these things do tend to unofficially converge with specced features... innerText springs to mind as that was eventually standardised!

from react-tags.

Pomax avatar Pomax commented on May 11, 2024

I suspect most browsers still support it because it would break all the things if they didn't, but probably worth updating for a next version =)

The .innerText property is a good example too. but my favourite most recent one I can remember is .outerHTML which became standardized when no one was looking. It makes life (for some of us) so much easier.

from react-tags.

i-like-robots avatar i-like-robots commented on May 11, 2024

I tried switching from keyCode to code when investigating #84 but unfortunately it doesn't seem to have been implemented in IE nor yet in Edge.

from react-tags.

Pomax avatar Pomax commented on May 11, 2024

boo =( (thanks Edge team...)

from react-tags.

ajmas avatar ajmas commented on May 11, 2024

The key seems to be the better attribute, based on: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key .

If we use delimiterChars, then we could do something like:

['Tab', 'Enter', ',']

But that has the risk of causing issues where we really want multi-character delimiters, if there really is a use-case for them.

Whatever solution we come up with, we need to consider:

  • Impact on typing, in the handleKeyDown method
  • Impact on pasting, in the handlePaste method
  • Whether there is a need for multi-character delimiters, which don't reference keys.

from react-tags.

i-like-robots avatar i-like-robots commented on May 11, 2024

I think the separation of delimiter keys (IE. pressing tab or enter) and delimiter characters is OK, so long as it is documented clearly. Using KeyboardEvent.key definitely seems like a good step to make in the next major version.

from react-tags.

ajmas avatar ajmas commented on May 11, 2024

Opened issue #94, based on an issue discovered on Android Chrome, which has an unfortunate impact, when it comes to KeyboardEvent.key and onKeyDown in general.

from react-tags.

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.