mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-16 04:37:41 +00:00
fix(web): incorporates some review suggestions
This commit is contained in:
parent
ffc381fcb6
commit
8826bec8fe
2 changed files with 8 additions and 6 deletions
|
|
@ -1244,8 +1244,10 @@ namespace com.keyman.dom {
|
|||
const osk = this.keyman.osk;
|
||||
if(osk) {
|
||||
if(this.lastActiveElement == null && this.activeElement == null) {
|
||||
if(this.keyman.osk.activeTarget) {
|
||||
this.keyman.osk.activeTarget = null;
|
||||
// Assigning to the property does have side-effects.
|
||||
// If the property is already unset, it's best to not unset it again.
|
||||
if(osk.activeTarget) {
|
||||
osk.activeTarget = null;
|
||||
}
|
||||
this.keyman.osk.hideNow(); // originally from a different one, seemed to serve the same role?
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace com.keyman.osk {
|
|||
export enum ActivationMode {
|
||||
static = "static", // For use by documentation keyboards, eventually.
|
||||
manual = "manual",
|
||||
conditional = "conditional"
|
||||
automatic = "automatic"
|
||||
}
|
||||
|
||||
export abstract class OSKView {
|
||||
|
|
@ -75,7 +75,7 @@ namespace com.keyman.osk {
|
|||
private needsLayout: boolean = true;
|
||||
|
||||
//
|
||||
private _activationMode: ActivationMode = ActivationMode.conditional;
|
||||
private _activationMode: ActivationMode = ActivationMode.automatic;
|
||||
private _displayIfActive: boolean = true;
|
||||
|
||||
private _animatedHideTimeout: number;
|
||||
|
|
@ -205,7 +205,7 @@ namespace com.keyman.osk {
|
|||
*/
|
||||
get activationMode(): ActivationMode {
|
||||
if(!this._activationMode) {
|
||||
this._activationMode = ActivationMode.conditional;
|
||||
this._activationMode = ActivationMode.automatic;
|
||||
}
|
||||
|
||||
return this._activationMode;
|
||||
|
|
@ -764,7 +764,7 @@ namespace com.keyman.osk {
|
|||
}
|
||||
|
||||
if(!this._Box) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue