This is a migrated thread and some comments may be shown as answers.

Paste problem with TextMode="MultiLine" and MaxLength set

8 Answers 99 Views
Input
This is a migrated thread and some comments may be shown as answers.
BiBongNet
Top achievements
Rank 2
BiBongNet asked on 02 Jan 2013, 01:41 PM
Hi,

I have a problem with RadTextBox, version 2012.3.1113.40. I cannot paste into the textbox when setting TextMode="MultiLine" and  MaxLength. This issue happens with IE 10 only.

Thanks.

8 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 07 Jan 2013, 10:03 AM
Hello,

Please try to upgrade the application to the latest official release of the controls and verify if the same issue appear.

All the best,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
BiBongNet
Top achievements
Rank 2
answered on 07 Jan 2013, 02:45 PM
Hi,

I have upgraded to the version 2012.3.1205.40, the problem still exists.

The console of IE Developer tools display the following error each time Control + V is pressed:

Telerik.Web.UI.WebResource.axd, line 12945 character 2
SCRIPT5007: Unable to get property 'selection' of undefined or null reference

The line 12945 is in bold in the code block below:

try{a=window.clipboardData.getData("Text");
}catch(d){c=false;
}if(c&&a!=""){if(d.preventDefault){d.preventDefault();
}var g=this._textBoxElement.document.selection.createRange();
var f=this._maxLength-this._textBoxElement.value.length+g.text.length;
var b=this._escapeNewLineChars(window.clipboardData.getData("Text"),"%0A").substr(0,f);
g.text=b;
}
0
Maria Ilieva
Telerik team
answered on 10 Jan 2013, 03:13 PM
Hi,

I tried to replicate the issue on my end in our online examples but to no avail. See the movies below which demonstrates my local test and let me know if I'm missing something.

http://screencast.com/t/25xddbytGvb


Kind regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Gavin Lees
Top achievements
Rank 1
answered on 19 Nov 2013, 03:48 AM
Hello,

There is an issue with the RadTextBox when setting MultiLine to true and MaxLength when running in IE11.
I get the error on my test page, with is running under .NET 4.5.1 and using Telerik.Web.UI build 2013.3.1114.45

You can reproduce it here in this demo:

http://demos.telerik.com/aspnet-ajax/input/examples/radtextbox/firstlook/defaultcs.aspx

Set MaxLength to 255 for example then try to paste something into the Multi-Line box.  

I get a JavaScript error:  
Line: 474
Error: Unable to get property 'createRange' of undefined or null reference
0
Shinu
Top achievements
Rank 1
answered on 19 Nov 2013, 08:06 AM
Hi Gavin,

This seems to be an issue with Internet Explorer 11 due to some changes introduced by Microsoft. Please have a look into this forum thread which deals with the same issue and how to fix that.

Thanks,
Shinu.
0
Gavin Lees
Top achievements
Rank 1
answered on 20 Nov 2013, 12:55 AM
Hi Shinu,

Thank you for the prompt response.  The work-around solved the Issue,
0
DevTeam
Top achievements
Rank 1
answered on 11 Dec 2013, 04:50 PM

This workaround did not work for me.


<script type="text/javascript">

Telerik.Web.UI.RadInputControl.prototype._onTextBoxPasteHandler_ = Telerik.Web.UI.RadInputControl.prototype._onTextBoxPasteHandler;

Telerik.Web.UI.RadInputControl.prototype._onTextBoxPasteHandler = function(e) {

if ($telerik.isSafari || document.selection) {

this._onTextBoxPasteHandler_(e);

}

};

</script>




Error:

JavaScript runtime error: Unable to get property 'prototype' of undefined or null reference



Using Q32013 control set.

0
Maria Ilieva
Telerik team
answered on 16 Dec 2013, 01:16 PM
Hello Robert,

Please try to download the latest version of the control where the issue is already fixed. Give it a try and verify if it works for you.

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Input
Asked by
BiBongNet
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
BiBongNet
Top achievements
Rank 2
Gavin Lees
Top achievements
Rank 1
Shinu
Top achievements
Rank 1
DevTeam
Top achievements
Rank 1
Share this question
or