fix editbox 'this' missing (#2944)

This commit is contained in:
PP
2018-07-05 21:22:47 +08:00
committed by pandamicro
parent 077dbfd1ad
commit adb3920233
@@ -267,7 +267,7 @@ let EditBoxImpl = cc.Class({
_endEditing () {
let self = this;
let hideDomInputAndShowLabel = function () {
if (!self._alwaysOnTop) {
if (!self._alwaysOnTop && self._edTxt) {
self._edTxt.style.display = 'none';
}
if (self._delegate && self._delegate.editBoxEditingDidEnded) {
@@ -397,8 +397,9 @@ _p.createInput = function() {
// Called before editbox focus to register cc.view status
_p._beginEditingOnMobile = function () {
let self = this;
this.__orientationChanged = function () {
this._adjustEditBoxPosition();
self._adjustEditBoxPosition();
};
window.addEventListener('orientationchange', this.__orientationChanged);