This project is archived and is in readonly mode.

#585 open

insertAtCursor not working well in IE

Reported by Adidi | July 17th, 2011 @ 02:33 PM | in (closed)

I think it is related to getSelectedRange problematic function:
If you try to execute insertAtCursor to insert any char to a regular textbox the cursor messed up and always puts the char at the beginning of the textbox
This works fine in Firefox & Chrome:

   <input id="txt" type="text" />
   <br />
   <input type="button" value="Insert Char" onclick="insertChar();" />


  var current_index = 0;
  var arr = ['a','b','c','d','e','f','g','h','i'];
  function insertChar(){
     var txt ='txt');
     if(current_index == arr.length){
        current_index = 0;

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket