problem in Textarea.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am working in Urdu editor by using textarea object as input.
In FireFox, when I type at the bottom where textarea is scroll down, cursor remains in the current position but focus moves to top.

Following code is  applied .

var startPos = txtarea.selectionStart;
var endPos = txtarea.selectionEnd;

txtarea.value = txtarea.value.substring(0, startPos) + text  + txtarea.value.substring(endPos, txtarea.value.length);
txtarea.focus();
txtarea.selectionStart = startPos + text.length;
txtarea.selectionEnd = endPos + text.length;



thanks,
Mobeen.



[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux