Unplanned
Last Updated: 20 Jan 2021 12:57 by ADMIN
David
Created on: 13 Jan 2021 22:06
Category: UI for ASP.NET Core
Type: Feature Request
0
Html.Kendo().__For(model => model.__) duplicate ID common issue

This common issue immediately manifests itself through the Html helper output of shape Html.Kendo().__For(model => model.__). The output html contains a script following the created element, which contains:

kendo.syncReady(function(){jQuery("#NewPersonId").kendoTextBox({});});

This can possibly be mitigated by replacing the query part with:

jQuery(document.currentScript.previousSibling)
browser support for currentScript

browser support for previousSibling

This suggestion assumes that the script element is always the next sibling of the element being "syncReady"-ed.

 

This will not solve the issue of users facing the issue in the own code if they try to query the element by ID themselves, but it may save them the trouble of specifying an id in cases where they only need to do so to prevent ID contention. This is only a suggestion. Feel free to disregard it.

0 comments