Completed
Last Updated: 16 Feb 2022 15:29 by ADMIN
Release 2022.R1.SP.next
Stephane
Created on: 24 Jan 2022 15:12
Category: Button
Type: Bug Report
4
Button Tag and HtmlHelpers not serializing type property correctly

Bug report

Starting from version 2022.1.119 when the type of the button is set to 'submit' it still remains to 'button' which prevents submission of forms on click.

Reproduction of the problem

  1. Run this REPL
  2. Click the buttons

Expected/desired behavior

Type property should correctly set the button's type to 'submit'

Environment

  • Kendo UI version: 2022.1.119
  • Browser: [all]
9 comments
ADMIN
Stoyan
Posted on: 16 Feb 2022 15:29

Thank you to all of you for the provided feedback. You indeed present some very viable points.

In this thread I've mentioned briefly about the availability of our Internal Builds but wasn't clear enough of their purpose. With them we regularly release mostly bugfixes that are marked "Completed" in the Feedback Portal and are scheduled for the upcoming release. This way you can access and test these fixes right away without having to wait for the next official release in the beginning of March.

That being said I've tested this fix with the latest Internal Build version 2022.1.215 and it correctly serializes the type="submit" of the Button Component.

Please don't hesitate to contact us should further questions or issues occur.

Regards,
Stoyan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Aaron
Posted on: 09 Feb 2022 21:37

To expand on some of what Stephane is saying and maybe give some perspective on issues with the current approach... this upgrade introduced some bugs, which happens, this maybe being one of the more critical ones (without any warnings or errors, all forms are now broken and won't submit). I appreciate the openness, quick action, and suggestions on how to work around it. However, the official fix won't be available until the next update. Putting the several months of waiting and temporary workarounds aside, this also means that in order to receive the fix for this one specific bug, we must also install the next update. Since updates typically come with at least some bugs (some more critical than others), we essentially have to accept the risk of additional bugs as the "price we pay" to get the current bug fixed. We cannot fix current known bugs without opening ourselves up to the risk of additional new unknown bugs.

Going back to what Thomas was asking about, something like a simple hotfix in the meantime would solve these issues. We wouldn't have to wait a couple months for the next update and we wouldn't be forced to take on the risk of potential new bugs associated with installing the next new full update. I also understand that this update included some pretty major changes, but this is not specific to this particular update. This is not the first time I've found myself waiting for the next update to be released so I can get a fix I've been waiting for.

Stephane
Posted on: 09 Feb 2022 14:57
I agree with Thomas, the problem here is the general quality. At each release, there are some new few bugs like this one. It seems that there is a lack of tests.
And bug fixing should be much faster. We can't wait two months before a bug is fixed. The bug is marked as Completed but we can't access the correction, it is not logical.
Often, waiting the correction, the response is "there is a workaround". I hate this kind of response, we can't update all our code at each bug (and we will have to come back to it later).
To improve this, the bugs should be fixed very quickly and a prerelease version should be generated immediatly.
ADMIN
Stoyan
Posted on: 09 Feb 2022 14:27

Hi Thomas,

Thank you for your inquiry.

  1. Our R1 2022 Release introduced several regression bugs because it included major changes to the Component Rendering of the Telerik UI and Kendo UI. The general idea behind these changes is to increase the ease with which the Components are styled, customized and developed. I'd recommend our Components Rendering Article and Carl's Improvements Coming to Telerik and Kendo UI Themes in 2022 Blogpost which go in further depth on the topic.
  2. This regression wasn't planned or known at the time of release and that's the reason its introduction wasn't documented anywhere. Currently, the Feedback portal is where such issues are documented when they are discovered. That being said I will pass on your feedback regarding the documenting of newfound  regressions/critical bugs.
  3. As this bug is already marked as Completed, the fix will be a part of our next release which is scheduled for early March.

I hope the information above clarifies this matter. Please don't hesitate to let us know should further questions arise.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Thomas
Posted on: 07 Feb 2022 17:24

I have three main questions.

 

  1. How does something like this happen as a regression?  What steps are being taken to ensure something like this doesn't happen again?  I realize as well as anyone regressions happen, but something as simple as a submit button not working causes serious concern.
  2. When a critical regression is found, why isn't it added to the release notes?? https://www.telerik.com/support/whats-new/aspnet-core-ui/release-history/ui-for-asp-net-core-r1-2022(-version-2022-1-119) instead we are left to hunt down the regressions 
  3. Can this be released as a hotfix for 2022?
ADMIN
Stoyan
Posted on: 25 Jan 2022 11:07

Hi Aaron,

Thank you for your feedback.

The line: htmlAttributes.Add("type", "button"); sets the default  type of the button. The issue arises because of a regression that prevents the configuration of the .HtmlAttributes of the Button to change the type attribute.

I'd like to inform all concerned that this bug will be fixed with the highest priority.  Please follow the status of the thread as it will be labeled "Completed" when the issue is fixed. Then the fix will be part of our next official release. You will be able to immediately test the functionality in our internal releases.

 

Regards,
Stoyan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Stephane
Posted on: 25 Jan 2022 09:36

If you use tag helpers, another workaround can be to add a custom button tag helper like this :

```csharp

[HtmlTargetElement("kendo-button")]
public class SubmitButtonFixTagHelper : ButtonTagHelper
{
    public SubmitButtonFixTagHelper(IKendoHtmlGenerator generator) : base(generator)
    {
    }

    public string Type { get; set; }

    public override int Order => 1;

    protected override Dictionary<string, object> SerializeSettings()
    {
        var settings = base.SerializeSettings();
        if (Type != null)
        {
            settings["type"] = Type;
        }
        return settings;
    }
}

```

Aaron
Posted on: 24 Jan 2022 17:47

I, too, ran into this problem Friday last week (figured out the cause after troubleshooting, came here today to report it but saw it had already been reported).

 

FWIW, I looked at the source and found ButtonTagHelper's WriteHtml() method has the following line of code:

htmlAttributes.Add("type", "button");

 

I looked at the Button class (to compare the Tag Helper code above to the HTML Helper code) and found it does not contain the same line of code.

ADMIN
Stoyan
Posted on: 24 Jan 2022 15:34

Hi Stephane,

Until the bug is fixed I recommend you to workaround the issue by adding Kendo classes to it. This will style the button element much like Bootstrap:
              <button type="submit" class="k-button k-button-lg k-button-solid k-button-solid-primary k-rounded-lg">
                     Html Kendo Button
              </button>
Please refer to our updated Styles and Appearance article for more information about the available configurations.

 

Regards,
Stoyan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.