DropDownList and focused state ("k-state-focused")

7 posts, 1 answers
  1. David Rainton
    David Rainton avatar
    6 posts
    Member since:
    Mar 2004

    Posted 26 Aug 2014 Link to this post

    I have a question regarding the DropDownList control. There seems to be an issue with the way CSS-class related to focused state ("k-state-focused") is handled: sometimes it’s not removed when the control loses focus. It leads to multiple controls being highlighted as “focused” which was noticed by our customers and caused complaints. This behavior is reproducible on KendoUI demo page http://demos.telerik.com/kendo-ui/dropdownlist/index (as of version "2014.2.716"; see screenshot in the attachment, Inspector View is shown so you can see actual DOM). To reproduce:
    (a) expand drop-down list by mouse click;
    (b) close it back by clicking without moving mouse pointer (i.e. close drop-down list without making selection);
    (c) focus other control using Tab key or mouse. 
    Expected result: "k-state-focused" is removed from the control
    Actual result: "k-state-focused" is still there

    Code history publicly available at the GitHub suggests that commit responsible for this behavior is https://github.com/telerik/kendo-ui-core/commit/951c0ea4f29e42a251717875247b6e6e379ac783#diff-ac387d6d4912098fb93d306c9fe59421R357.
    There was a code fragment starting at line 357:

    that.wrapper
    .on("mousedown" + ns, function(e) {
        that._wrapperClicked = true;
    })

    Behavior introduced in that commit is still present in the current version albeit it looks somewhat different after recent changes (https://github.com/telerik/kendo-ui-core/blob/master/src/kendo.dropdownlist.js#L358):
           
    _wrapperMousedown: function() {
      this._prevent = true;
    },

    Is it really a defect or is there something wrong in the way we (and the demo page) use the DropDownControl?

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3720 posts

    Posted 27 Aug 2014 Link to this post

    Hello David,

    This is a known bug that slipped in the official release of Kendo UI (Q2 2014). The problem is addressed in the latest internal build. I would suggest you give it a try and let me know if the issue still persists.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. David Rainton
    David Rainton avatar
    6 posts
    Member since:
    Mar 2004

    Posted 27 Aug 2014 in reply to Georgi Krustev Link to this post

    Georgi, we actually did try some latest internal build about 1 week ago and there is still the same issue (version v2014.2.819). Currently the latest download I can see is v2014.2.826 and I see no difference in kendo.dropdownlist.js and the only difference in kendo.list.js seems unrelated to the issue. Could you tell me, in what build the issue is expected to be fixed?
  4. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3720 posts

    Posted 27 Aug 2014 Link to this post

    Hello David,

    Yes, you are absolutely right. The issue is still there and can be reproduced with the latest internal build of Kendo UI. I logged a bug report here. We will address this bug in the upcoming official release of Kendo UI due the beginning of September.
    I updated your Telerik points because of the involvement.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Charles
    Charles avatar
    2 posts
    Member since:
    Feb 2014

    Posted 28 Nov 2016 Link to this post

    Can you tell me which version did this get fixed in? We are using 2014.3.1411 and the issue continues to exist. In our situation, the user clicks in the "state" dropdownlistfor object and selects TX then clicks on the "County" dropdownlistfor object and starts typing "Ca" to jump to the appropriate county in the drop down list and the state dropdownlistfor object changes from TX to CA. The "state" drop down list object never lost focus or the "county" drop down list object never obtained it. This does not happen if you tab through the objects. Your help would be appreciated.
  6. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3720 posts

    Posted 29 Nov 2016 Link to this post

    Hello Charles,

    According to the Github issue, the fix was pushed in August, which means that it is included in Q3 2014 release. If the still persists, then I would suggest you try Q1 2015. If I recall correctly, there was another related issue that was fixed in that specific version.

    Regards,
    Georgi Krustev
    Telerik by Progress
    Kendo UI is ready for Visual Studio 2017 RC! Learn more.
  7. Charles
    Charles avatar
    2 posts
    Member since:
    Feb 2014

    Posted 29 Nov 2016 Link to this post

    Thanks Georgi.

    I will take a look at the Q1 2015 version.

Back to Top