Paste problem with TextMode="MultiLine" and MaxLength set

9 posts, 0 answers
  1. BiBongNet
    BiBongNet avatar
    27 posts
    Member since:
    May 2010

    Posted 02 Jan 2013 Link to this post

    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.
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 07 Jan 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. BiBongNet
    BiBongNet avatar
    27 posts
    Member since:
    May 2010

    Posted 07 Jan 2013 Link to this post

    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;
    }
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 10 Jan 2013 Link to this post

    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.
  6. Gavin Lees
    Gavin Lees avatar
    4 posts
    Member since:
    May 2010

    Posted 18 Nov 2013 Link to this post

    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
  7. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Nov 2013 Link to this post

    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.
  8. Gavin Lees
    Gavin Lees avatar
    4 posts
    Member since:
    May 2010

    Posted 19 Nov 2013 Link to this post

    Hi Shinu,

    Thank you for the prompt response.  The work-around solved the Issue,
  9. DevTeam
    DevTeam avatar
    2 posts
    Member since:
    Sep 2013

    Posted 11 Dec 2013 Link to this post

    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.

  10. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 16 Dec 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017