diff --git a/cocos2d/core/editbox/CCSGEditBox.js b/cocos2d/core/editbox/CCSGEditBox.js index 3d779c8a65..57ee1a9d22 100644 --- a/cocos2d/core/editbox/CCSGEditBox.js +++ b/cocos2d/core/editbox/CCSGEditBox.js @@ -627,6 +627,8 @@ _ccsg.EditBox.KeyboardReturnType = KeyboardReturnType; } else { thisPointer.__fullscreen = false; } + this.__autoResize = cc.view.__resizeWithBrowserSize; + cc.view.resizeWithBrowserSize(false); scrollWindowUp(editBox); @@ -641,6 +643,9 @@ _ccsg.EditBox.KeyboardReturnType = KeyboardReturnType; if(thisPointer.__fullscreen) { cc.view.enableAutoFullScreen(true); } + if (this.__autoResize) { + cc.view.resizeWithBrowserSize(true); + } window.scrollY = 0; if (editBox._delegate && editBox._delegate.editBoxEditingDidEnded) { editBox._delegate.editBoxEditingDidEnded(editBox); diff --git a/cocos2d/core/platform/CCSys.js b/cocos2d/core/platform/CCSys.js index 611b70eab7..03ce765d18 100644 --- a/cocos2d/core/platform/CCSys.js +++ b/cocos2d/core/platform/CCSys.js @@ -490,7 +490,7 @@ else { * Indicate whether system is mobile system * @property {Boolean} isMobile */ - sys.isMobile = /mobile|android|mqqbrowser|micromessenger|miuibrowser/.test(ua); + sys.isMobile = /mobile|android|iphone|ipad/.test(ua); /** * Indicate the running platform