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

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

6 Answers 1196 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
David Rainton
Top achievements
Rank 1
David Rainton asked on 26 Aug 2014, 10:43 PM
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?

6 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 27 Aug 2014, 10:06 AM
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!
 
0
David Rainton
Top achievements
Rank 1
answered on 27 Aug 2014, 11:45 AM
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?
0
Accepted
Georgi Krustev
Telerik team
answered on 27 Aug 2014, 03:46 PM
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!
 
0
Charles
Top achievements
Rank 1
answered on 28 Nov 2016, 09:17 PM
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.
0
Georgi Krustev
Telerik team
answered on 29 Nov 2016, 08:48 AM
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.
0
Charles
Top achievements
Rank 1
answered on 29 Nov 2016, 12:31 PM

Thanks Georgi.

I will take a look at the Q1 2015 version.

Tags
DropDownList
Asked by
David Rainton
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
David Rainton
Top achievements
Rank 1
Charles
Top achievements
Rank 1
Share this question
or