This pull request was raised because of below mentioned statement in jquery.signaturepad.js/ jquery.signaturepad-min.js.
$( “input” ).blur();
Essentially the above line means that it will look for all input element in the DOM and fire a blur event on to it. Even though signature element is not in focus blur event is getting triggered which is not correct.
Below is the proposed solution which will be specific binding. Blur event will be fired only when signature element is in focus.
Making binding of blur event more specific. With this change blur event will be triggered only when signature pad is in focus. Without this change blur event is fired even if focus is not on signature canvas. Binding on just "input" element is too generic which can easily get in conflict with other "input" elements present in the web page.
This is regarding below mentioned pull request.
https://github.com/nspatilk/signature-pad/pull/1
This pull request was raised because of below mentioned statement in jquery.signaturepad.js/ jquery.signaturepad-min.js.
$( “input” ).blur();
Essentially the above line means that it will look for all input element in the DOM and fire a blur event on to it. Even though signature element is not in focus blur event is getting triggered which is not correct.
Below is the proposed solution which will be specific binding. Blur event will be fired only when signature element is in focus.
Making binding of blur event more specific. With this change blur event will be triggered only when signature pad is in focus. Without this change blur event is fired even if focus is not on signature canvas. Binding on just "input" element is too generic which can easily get in conflict with other "input" elements present in the web page.