Dropdown inside a label-tag

2 posts, 0 answers
  1. Sebastian
    Sebastian avatar
    1 posts
    Member since:
    Nov 2011

    Posted 13 Dec 2011 Link to this post

    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.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 16 Dec 2011 Link to this post

    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!
Back to Top