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

Space bar not working in input

19 Answers 556 Views
Input
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 07 Jan 2013, 10:01 AM
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

19 Answers, 1 is accepted

Sort by
0
Accepted
Boyan Dimitrov
Telerik team
answered on 10 Jan 2013, 03:56 PM
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.
0
Jon
Top achievements
Rank 1
answered on 10 Jan 2013, 04:08 PM
Hi Boyan

Great that works a treat, many thanks.

What causes this weird behaviour?

Regards,

Jon
0
Boyan Dimitrov
Telerik team
answered on 15 Jan 2013, 09:58 AM
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.
0
Ron
Top achievements
Rank 1
answered on 28 Jan 2013, 09:14 PM
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
0
Boyan Dimitrov
Telerik team
answered on 29 Jan 2013, 12:53 PM
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.
0
Khayam
Top achievements
Rank 1
answered on 25 Jul 2013, 02:44 PM
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
0
Boyan Dimitrov
Telerik team
answered on 30 Jul 2013, 11:45 AM
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.
0
Khayam
Top achievements
Rank 1
answered on 30 Jul 2013, 01:56 PM
 
  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?
0
Khayam
Top achievements
Rank 1
answered on 30 Jul 2013, 02:09 PM
I have actually just noticed that the problem with the space bar still exists within the RadTextBox when you set the TextMode as MultiLine
0
Boyan Dimitrov
Telerik team
answered on 02 Aug 2013, 08:38 AM
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.
0
Khayam
Top achievements
Rank 1
answered on 02 Aug 2013, 10:21 AM
Spot on, cheers!
0
mmbm
Top achievements
Rank 2
answered on 09 Dec 2013, 07:51 PM
Do I still need the workaround even after upgrading to the latest telerik?
0
Boyan Dimitrov
Telerik team
answered on 11 Dec 2013, 05:22 PM
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.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 05 Sep 2017, 05:38 PM
why is this still not fixed for multiline textboxes nearly 4 years later?
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 05 Sep 2017, 05:52 PM
Also, this issue appears to still exist for both single line and multiline textboxes when they are inside Panelbar templates.
0
Eyup
Telerik team
answered on 11 Sep 2017, 06:01 AM
Hello Albert,

The reason is probably the same - the event handlers get reserved for the internal logic of the container control:
https://feedback.telerik.com/Project/108/Feedback/Details/191532-unable-to-add-white-space-in-radpanelbar-input-nested-inside-itemtemplate

You can try using a similar workaround script to stop the propagation from the inner element up the DOM.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Avram
Top achievements
Rank 1
answered on 23 Sep 2019, 11:24 PM

I have tried the workaround for multiline textbox in a node template but it doesn't work. Any ideas?

Thanks

0
Avram
Top achievements
Rank 1
answered on 24 Sep 2019, 12:01 AM
Seems like it works without workaround in IE 11 but not at all in any of the latest browsers (Edge, Chrome, Firefox).
0
Eyup
Telerik team
answered on 26 Sep 2019, 07:49 AM

Hello Avram,

 

I have the following suggestions for this case:

 

1. Try upgrading to the latest version of the controls, if not already in use.

2. You can open a formal support ticket to send us a very basic runnable sample demonstrating your specific configuration and the issue you are facing. This will enable us to reproduce the exact problem locally on our side to further investigate and debug it. And then we will send you back more precise and accurate solutions, tailored specifically for your project. 

 

Regards,
Eyup
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Input
Asked by
Jon
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Jon
Top achievements
Rank 1
Ron
Top achievements
Rank 1
Khayam
Top achievements
Rank 1
mmbm
Top achievements
Rank 2
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Eyup
Telerik team
Avram
Top achievements
Rank 1
Share this question
or