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

Two clicks to action button after writing on data-binded input

1 Answer 6 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Laurence
Top achievements
Rank 1
Laurence asked on 29 Oct 2015, 04:28 PM

Hi everyone,

I encounter this problem and it's quite annoying, after writing on a input text that is data-binded to the model I have to click twice the button that is on the same div group. Here I provide a JSFiddle that shows the problem, if you remove the data-bind on the input text you don't have to click twice the button to fire the action.

http://jsfiddle.net/MKZfr/3/

 

 

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 30 Oct 2015, 08:43 AM
Hello,

the problem you describe is related to the source/template binding. The first time the button is clicked, the input gets blurred, the view model is changed, and the entire markup gets redrawn. This is easier to spot with this minor modification

The easiest means to avoid this is not to use a source/template binding. In case you need to repeat items, you may use the listview widget, which fixes this problem. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Laurence
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or