mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
hide editbox input onDisable when stayOnTop (#3129)
This commit is contained in:
@@ -577,6 +577,14 @@ let EditBox = cc.Class({
|
||||
this._impl.clear();
|
||||
},
|
||||
|
||||
onEnable () {
|
||||
this._impl && this._impl.onEnable();
|
||||
},
|
||||
|
||||
onDisable () {
|
||||
this._impl && this._impl.onDisable();
|
||||
},
|
||||
|
||||
__preload () {
|
||||
if (!CC_EDITOR) {
|
||||
this._registerEvent();
|
||||
|
||||
@@ -93,6 +93,25 @@ let EditBoxImpl = cc.Class({
|
||||
this.__orientationChanged = null;
|
||||
},
|
||||
|
||||
onEnable () {
|
||||
if (!this._edTxt) {
|
||||
return;
|
||||
}
|
||||
if (this._alwaysOnTop) {
|
||||
this._edTxt.style.display = '';
|
||||
}
|
||||
else {
|
||||
this._edTxt.style.display = 'none';
|
||||
}
|
||||
},
|
||||
|
||||
onDisable () {
|
||||
if (!this._edTxt) {
|
||||
return;
|
||||
}
|
||||
this._edTxt.style.display = 'none';
|
||||
},
|
||||
|
||||
setTabIndex (index) {
|
||||
if (this._edTxt) {
|
||||
this._edTxt.tabIndex = index;
|
||||
|
||||
Reference in New Issue
Block a user