Closed Juanmenacho closed 1 year ago
If a tab is added, with a title that has more than one blank space, the display of the navigation tabs fails.
Example, tab:
{ "title": "Movies and TV", "type": "tab", "items": [ { "key": "favorite_movie", "type": "radiobuttons", "activeClass": "btn-success" } ] }
It will generate the following HTML: <div class="tab-pane" id="navtabs-Movies_and TV">
<div class="tab-pane" id="navtabs-Movies_and TV">
Will cause the jQuery selector to fail when trying to retrieve the element by its ID
Example tested on https://jsonform.github.io/jsonform/playground/index.html?example=navigation-tabs
One possible solution is to replace the replace function with replaceAll when constructing the element id in the template, screenshots are attached.
I wonder if there are any other characters in labels that cause similar problem
no spaces allowed in IDs. but can be escaped
If a tab is added, with a title that has more than one blank space, the display of the navigation tabs fails.
Example, tab:
It will generate the following HTML:
<div class="tab-pane" id="navtabs-Movies_and TV">
Will cause the jQuery selector to fail when trying to retrieve the element by its ID
Example tested on https://jsonform.github.io/jsonform/playground/index.html?example=navigation-tabs
One possible solution is to replace the replace function with replaceAll when constructing the element id in the template, screenshots are attached.