Space bar not working in input

14 posts, 1 answers
  1. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 07 Jan 2013 Link to this post

    Hi ALl,

    This is an odd one.  I am using a tree view object with a node template,  inside the node template I add in at the server a variety of fields including a basic text box.  They all work fine but for the fact that pressing space inside the text box does nothing....  However if I do some notes in another application then copy and paste them into the textbox any spaces carry over.  

    Any idea why this may be happening.  Code for textbox is below

    Dim _uxNotes As RadTextBox = New RadTextBox()
    _uxNotes.ID = "uxNotes"
    _uxNotes.Enabled = True
    _uxNotes.Width = 200
    AddHandler _uxNotes.DataBinding, AddressOf UxNotes_DataBinding
    container.Controls.Add(_uxNotes)

    Regards,

    Jon
  2. Answer
    Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 10 Jan 2013 Link to this post

    Hello Jon,

    Thank you for contacting Telerik Support.

    Could you please try the following code snippet to avoid that unusual behavior:
    //markup code
    <telerik:RadTreeView runat="server" ID="RadTreeView1"....  OnClientLoad="clientLoad">
    ........
     </telerik:RadTreeView>
    //JavaScript
    function clientLoad(sender) {
                    $telerik.$("input", sender.get_element()).on('keydown', function (e) {
                        if (!e) var e = window.event;
                        e.cancelBubble = true;
                        if (e.stopPropagation) e.stopPropagation();
                    });
                }

    Hope this helps.


    Regards,
    Boyan Dimitrov
    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. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 10 Jan 2013 Link to this post

    Hi Boyan

    Great that works a treat, many thanks.

    What causes this weird behaviour?

    Regards,

    Jon
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 15 Jan 2013 Link to this post

    Hello,

    I am glad that solved your issue. The space bar is part of RadTreeView keyboard navigation functionality that might conflict with printing empty space in the input field. I already logged that issue in our system for future fixing. 

    Thank you for your cooperation.

    Kind regards,
    Boyan Dimitrov
    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. Ron
    Ron avatar
    4 posts
    Member since:
    Apr 2008

    Posted 28 Jan 2013 Link to this post

    I've noted the same problem with node templates not allowing the space bar for data entry with the most recent upgrades. Is there any time line on resolving the space bar RadTreeView navigation issue? Will continue to use the JavaScript fix until then.

    Thanks
  7. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 29 Jan 2013 Link to this post

    Hello,

    I have just increased the priority of that issue in our system. Unfortunately we could not commit a specified date or time period that will take to resolve the issue. Indeed I would recommend you to use that JavaScript workaround until the issue is fixed.

    Regards,
    Boyan Dimitrov
    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.
  8. Khayam
    Khayam avatar
    4 posts
    Member since:
    Jul 2013

    Posted 25 Jul 2013 Link to this post

    Hi Boyan,

      I'm struggling with this issue as well. I've tried a few different javascript fixes that have been mentioned in other posts as well as this one and it still does not work. I have the latest Telerik Controls (2013.2.717.40) which I think is 2013 Q2. Is there any other fix that I can use? Or is there a schedule of when this will be fixed. Could you please let me know as soon as possible. Thanks
  9. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 30 Jul 2013 Link to this post

    Hello,

    I would like to clarify that the issue is already resolved and it is working as expected without any client-side workarounds. Please watch here a video showing the behavior of a sample project containing RadTreeView with RadTextBox control within the NodeTemplate. I would like to clarify that this is tested with our RadControls latest version Q2 2013 SP1 ( 2013.2.717.40).


    Regards,
    Boyan Dimitrov
    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.
  10. Khayam
    Khayam avatar
    4 posts
    Member since:
    Jul 2013

    Posted 30 Jul 2013 Link to this post

     
      Just checked and you are correct, it does work with RadTextBoxs, but the issue still exists when using an HtmlTextArea. Any idea on a potential fix for that?
  11. Khayam
    Khayam avatar
    4 posts
    Member since:
    Jul 2013

    Posted 30 Jul 2013 Link to this post

    I have actually just noticed that the problem with the space bar still exists within the RadTextBox when you set the TextMode as MultiLine
  12. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 02 Aug 2013 Link to this post

    Hello,

    Indeed the workaround provided in this form thread will not work when the TextMode of the RadTextBox control is set to "Multiline". This is caused by the fact that the RadTextBox rendered HTML element is no longer <input /> but <textarea ></textarea> element. So in this case you can simply modify the JavaScript code as shown in the code snippet below:
    //JavaScript
    function clientLoad(sender) {
        $telerik.$("textarea", sender.get_element()).on('keydown', function (e) {
            if (!e) var e = window.event;
            e.cancelBubble = true;
            if (e.stopPropagation) e.stopPropagation();
        });
    }


    Regards,
    Boyan Dimitrov
    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.
  13. Khayam
    Khayam avatar
    4 posts
    Member since:
    Jul 2013

    Posted 02 Aug 2013 Link to this post

    Spot on, cheers!
  14. kreester
    kreester avatar
    15 posts
    Member since:
    Sep 2008

    Posted 09 Dec 2013 Link to this post

    Do I still need the workaround even after upgrading to the latest telerik?
  15. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 11 Dec 2013 Link to this post

    Hello,

    I would like to clarify that if you set the RadTextBox TextMode to "Multiline" you will still need the workaround posted in my last reply. If you do not set the TextMode property to "Multiline" you will not need the workaround since it is already resolved.


    Regards,
    Boyan Dimitrov
    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