Binding problem using Toolbar

4 posts, 0 answers
  1. Marcel
    Marcel avatar
    36 posts
    Member since:
    Apr 2011

    Posted 14 Aug 2014 Link to this post

    Hello,

    Due to the introduction of the Toolbar i decided to replace my own toolbars with the Kendo Toolbars.
    This all went fine, except now i have a problem with updating the viewmodel.

    If i change the value of a data-bound input and click (for example) the save button on the Toolbar,
    the blur event of that input never gets called and thus the viewmodel won't be updated.

    If i use a KendoButton outside of the Toolbar i have no problems, since the focus changes to the KendoButton and the blur event of the input gets triggered.

    I included a jsFiddle to show you what i mean.
    http://jsfiddle.net/6mrmb40k/

    - Change the value of the input and click the save button on the toolbar.
    - Change the value of the input and click the save button outside the toolbar.

    Any ideas how to fix this ?

    Thanks in advance.

  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 18 Aug 2014 Link to this post

    Hi Marcel,

    The issue occurs because the ToolBar event handlers prevent the mousedown event and as a result the input does not fire its change event.
    We will add a build-in solution for that issue in the next internal build, meanwhile you may use the data-value-update attribute to tell the MVVM to update the value when the "input" event occurs. The input event is not affected by the mousedown event.

    <input class="k-textbox" data-value-update="input" data-bind="value: text"/>

    Here is a link to the updated jsFiddle version:  http://jsfiddle.net/6mrmb40k/1/

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Marcel
    Marcel avatar
    36 posts
    Member since:
    Apr 2011

    Posted 25 Aug 2014 in reply to Alexander Valchev Link to this post

    Hey Alexander,

    Although not mentioned in de build notes of the lastest internal build, apparently it is indeed fixed.
    Thanks for that.

    Regards.
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 26 Aug 2014 Link to this post

    Hi Marcel,

    Yes the fix was included in the latest internal build. We will investigate why the release notes were not updated.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready