Already an input

2 posts, 0 answers
  1. Guru
    Guru avatar
    112 posts
    Member since:
    Jul 2011

    Posted 16 May 2012 Link to this post

    I haven't done a ton of testing and obviously I wouldn't do it on purpose even though it sounds like a "dont do that" situation but with the nature of dynamic interfaces I thought others may run into this.

    If I have an <input /> with a class "k-input" and then tell it to be a kendoDropDownList or ComboBox, it actually crashes my browser if you try to click in the field. Like I said I didn't do a bunch of controlled tests but I have several drop lists and a grid in a panelbar also and I am seeing it crash in firefox 12 on a win 7 32b pc.
  2. Dimo
    Admin
    Dimo avatar
    8482 posts

    Posted 17 May 2012 Link to this post

    Hello Zack,

    Although I did not manage to crash my browser, you will need to remove the k-input CSS class before instantiating a widget from a DOM element. This is because the k-input CSS class is intended for in-widget-use only and the widgets do not expect this CSS class to exist initially. Their behavior is to try to copy the initial CSS classes from the textbox to the widget wrapper, which will result in a k-input class applied to an element that should not have it.

    You can use a k-textbox CSS class for standalone <input> elements (it is better than k-input), however, this also needs to be removed before widget initialization.

    Greetings,
    Dimo
    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