Comments (5)
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.
@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.
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.
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.
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)
- Switch to edit mode only on double click HOT 1
- When using Firefox and pressing enter, a <br> tag is added to the saved html HOT 1
- Custom components in html? HOT 1
- Retain caret position while dynamically changing the rendered html HOT 2
- cursor outside of block HOT 3
- expose props API to enable selection range get & set HOT 1
- auto height support
- vertical align center support as a props option HOT 3
- accept image
- Contenteditable should accept aria, for to accommodate label HOT 1
- ContentEditable' cannot be used as a JSX component HOT 4
- ability to set inputmode
- if ContentEditable in contenteditable="true", no trigger onChange HOT 1
- Is this component usable in Typescript?
- vim cursor popping up to top of view when hit escape
- how to set custom style in html HOT 1
- Getting caret line number.
- Enable passing custom value for active state
- Paste wont work some times.
- Content color is changing to red
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-contenteditable.