Giter Club home page Giter Club logo

Comments (5)

slorber avatar slorber commented on June 5, 2024

Hi,

@mertkahyaoglu theinitial code comes from this SO question:
http://stackoverflow.com/questions/22677931/react-js-onchange-event-for-contenteditable

I don't know why @brigand did put a onBlur listener, but in my experience I don't see much value in keeping it.

My current UncontrolledContentEditable I use in production looks like this and does not been to emit change on blur:
https://gist.github.com/slorber/b84c6c7c2d2c3c6250c53a001b674688

from react-contenteditable.

mertkahyaoglu avatar mertkahyaoglu commented on June 5, 2024

@slorber Thanks for quick response. Actually #16 fixes the problem I guess, but it is not available on npm (still 1.1.0). With that PR, I can override the onBlur event by passing an empty function to prevent emiting change.

from react-contenteditable.

jvalente avatar jvalente commented on June 5, 2024

Hello everyone. Here are my warm regards to everyone using contentEditable in general and contentEditable with React in particular.

Here's a question: considering that the current solution won't work on IE11 because of this and by definition (I confess that I didn't take a look at the React SynteticEvent creation based on DOM events), what do you guys think about using onKeyUp instead of onInput here?.

Kind regards and thank you for your work.

from react-contenteditable.

slorber avatar slorber commented on June 5, 2024

Hmmm I've just done some test and for me it seems onInput works fine on IE, however I've been reported there might be a problem on my app on IE11 where a text paste does not trigger onInput.

I'll have to digg deeper another day

from react-contenteditable.

Treora avatar Treora commented on June 5, 2024

The original onBlur issue seems resolved, so closing this one. The question about onInput events in IE11 may be worth opening as a separate issue, if it is still relevant.

from react-contenteditable.

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.