Comments (2)
This is almost certainly because you're doing this in a click
(or similar) handler on a buttton that has stolen focus from your textarea or input and destroyed the selection by the time the click
event fires. You can work around this by using mousedown
instead, or by making the button unselectable.
from rangyinputs.
Thanks a lot Tim. What you have mentioned above is what is happening in my case. Thanks for your time.
from rangyinputs.
Related Issues (19)
- Can I using this plugin for contenteditable div? HOT 1
- Bower support HOT 4
- Undo / redo support HOT 8
- IE 8 Bug HOT 3
- how to set the focus to the end of text using insertText to achieve text scrolling, when the text goes beyond the border of the text field HOT 1
- IE 9 Bug HOT 10
- Jquery link is down on demo HOT 2
- Convert to NPM module? HOT 6
- Support for contenteditable DIVs? HOT 1
- extractSelectedText() behaviour differs between normal and minified JS HOT 3
- Please specify License HOT 3
- Make getSelection()['start'] the default value for [Number Start]
- Init plugin before document.ready? HOT 3
- Other input field in the page don't works HOT 1
- Textarea scrolls down when replacing/inserting text HOT 1
- dispatchEvent on input change
- Adding to cdnjs
- getBody().appendChild(testTextArea); throws Cannot read property 'appendChild' of undefined HOT 4
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 rangyinputs.