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

Dropdown inside a label-tag

1 Answer 214 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 13 Dec 2011, 03:58 PM
Hi,

i'll try with my poor english :)
 
It is a problem to place a DropDown inside a label-tag?

<label>
<
strong>Title</strong>
<
select id="form-register-title" class="required title"></select>
</
label>

The DropDown doesn't open when clicking, but only by clicking the label-text ("Title").
A workaround/bugfix is nice :)

Thank you!

/edit: The focus-event on the select element should trigger the DropDown open(dropdown)-event.
Cause it isnt possible to access the DropDown via tabulator.
A nice feature is to step up or down with the corresponding keys and select/activate with tab.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 16 Dec 2011, 10:11 AM
Hello Sebastian,

The DropDownList widget closes on blur. In this case the label will cause a blur of the widget. That is why the popup will not open on click. What I can suggest you is to not put the dropdownlist inside a label:

<label>
    <strong>Title</strong>
</label>
<select id="form-register-title" class="required title"></select>

As to the second question, you can access the DropDownList via a keyboard. It works like the normal select element. When you focus the widget you can use Up/Down arrow or to open the dropdownlist using Alt+down arrow.
Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or