Skip to content

Commit

Permalink
Set preview value before triggering accept event
Browse files Browse the repository at this point in the history
base.$preview = base.$el when usePreview is false
  • Loading branch information
Mottie committed May 29, 2014
1 parent 28e4e7c commit 0243ba2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/jquery.keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,9 @@ $.keyboard = function(el, options){
}
base.isCurrent(false);
base.isOpen = false;
// update value for always open keyboards
base.$preview.val(val);

base.$el
.removeClass('ui-keyboard-input-current ui-keyboard-autoaccepted')
// add "ui-keyboard-autoaccepted" to inputs - see issue #66
Expand All @@ -921,8 +924,6 @@ $.keyboard = function(el, options){
.trigger( ((accepted || false) ? 'accepted.keyboard' : 'canceled.keyboard'), [ base, base.el ] )
.trigger( (o.alwaysOpen) ? 'inactive.keyboard' : 'hidden.keyboard', [ base, base.el ] )
.blur();
// update value for always open keyboards
base.$preview.val(val);
if (o.openOn) {
// rebind input focus - delayed to fix IE issue #72
base.timer = setTimeout(function(){
Expand Down

0 comments on commit 0243ba2

Please sign in to comment.