Merge pull request #677 from keymanapp/web-cookies-overwritten-by-stub-registration

[Web] Keyboard state cookie overwritten by first keyboard registration
This commit is contained in:
Marc Durdin 2018-03-20 13:15:19 +07:00 • committed by GitHub
commit a509b41555
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -324,7 +324,11 @@ namespace com.keyman {
// If we have no activeStub because there were no stubs, set the new keyboard as active.
// Do not trigger on merges.
if(!this.activeStub && isNew && this.keyboardStubs.length == 1) {
this.setActiveKeyboard(sp['KI'], sp['KLC']);
// #676: We call _SetActiveKeyboard so we can avoid overwriting
// cookies that determine our active keyboard at page load time
this.doBeforeKeyboardChange(sp['KI'], sp['KLC']);
this._SetActiveKeyboard(sp['KI'], sp['KLC'], false);
this.doKeyboardChange(sp['KI'], sp['KLC']);
}
}