I have WebTextEditor placed in aspx page with certain width say width="100px".
My problem is ,when I am typing the characters in the WebTextEditor, I can see the cursor moving till I reach the end of the WebTextEditor. Once it reaches the end, I cannot see the text being entered as cursor is not appeared to be moving. But when I hit the end button on keyboard , its showing me the text.
I believe this is the basic behaviour of any text box. What is the fix for this.
<ig:WebTextEditor ID="WebTextEditor1" Width="100px" runat="server">
</ig:WebTextEditor>
Hi santoshb4u,
It has been some time since your post, however in case you still need assistance I would be glad to help.
You are correct that the behavior you are experiencing is native to any textbox. In this scenario it may be worth exploring the SelectionOnFocus property of the control in order to govern the position of the caret upon focusing. Otherwise you can explore the TextChanged client-side event in order to set the input's behavior as per your requirement.
Please do not hesitate to contact me if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://es.infragistics.com/support
Hi,
Similar behavior is probably happens in Firefox.Around half year ago a special logic was added to text editor, which should trigger horizontal scroll in Firefox after a keyboard entry. Please try to get latest version of NetAdvantage.
Hi Christian,
Thank you for report. That issue was reproduced and fixed. Updates will be available within service releases.
Though, fix is partial and it will not work for any extended editor or for modified key entries neither: when application processes ClientEvents.KeyPress and uses custom replacement values for eventArgs.set_keyCode(customValue) or eventArgs.set_char(customValue).Unfortunately no work around for scroll-to-caret under IE11 was found.The "Fix" for WebTextEditor is nothing more, than skipping all logic related to manual building text and selection and allowing browser to perform its default actions on keys.
The javascript in IE10/11 is a real headache and now IE11 introduced another problem. It dropped support for IE-standard selection model (INPUT.createTextRange), and only INPUT.selectionStart/End are available.IE fails to scroll and keep caret visible when value and selectionStart/End are modified. The INPUT.scrollLeft is ignored by IE11 (it works in IE9, Chrome and Safari).Latest Firefox does not need any work around and it scrolls text automatically when selectionStart/End are modified.
To mimic (oversimplified) logic used by WebTextEditor and verify scroll-to-caret bug in IE11, following codes can be tested.<body onload="onLoad()"> <script type="text/javascript"> function onLoad() { var input = document.getElementById('input1'); input.onkeypress = function (e) { if(e.stopPropagation) e.stopPropagation(); if(e.preventDefault) e.preventDefault(); e.cancelBubble = true; e.returnValue = false; this.value += String.fromCharCode(e.keyCode || e.which); this.selectionStart = this.selectionEnd = this.value.length; // commented scrollLeft would fix IE9 (if WebTextEditor used selectionStart/End) // but IE11 ignores that property/attribute //this.scrollLeft = this.scrollWidth || this.offsetWidth; }; } </script> <input type="text" style="width:50px" id="input1" /></body>
Hi Vicktor
I need to know if it already has a fix to prevent emulation options enabled and working directly with IE11 smoothly
if there is already a fix where I can download?
Hi Carlos,
I looked at history of released updates. That last one was around 1/9/2014. I did not include that fix. You can check when next service release will be available for download and try that.
Hi - I am using infragistics45.Web.v14.2 ; I have trouble in setting the cursor at specified location using SelectionStart and selectionEnd. In client events I have the below code
sender.selectionStart = oEdit.get_value().length; sender.selectionEnd = oEdit.get_value().length;
Can you please suggest, thank you.
Fixed the caret position issue by using the property SelectionOnFocus of WebTextEditor