You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by xi...@apache.org on 2018/12/25 13:18:43 UTC

[incubator-weex] branch master updated: [iOS] WXEditComponent provides keyboardSize with front-end px value. (#1965)

This is an automated email from the ASF dual-hosted git repository.

xifang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 74fee8d  [iOS] WXEditComponent provides keyboardSize with front-end px value. (#1965)
74fee8d is described below

commit 74fee8d59dc7412201ad3fbe24b098728a622f63
Author: wqyfavor <wq...@gmail.com>
AuthorDate: Tue Dec 25 21:18:39 2018 +0800

    [iOS] WXEditComponent provides keyboardSize with front-end px value. (#1965)
---
 ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm
index 69bc7ae..8f24fa4 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm
+++ b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm
@@ -950,7 +950,7 @@ WX_EXPORT_METHOD(@selector(setTextFormatter:))
     }
     
     if (_keyboardEvent) {
-        [self fireEvent:@"keyboard" params:@{ @"isShow": @YES, @"keyboardSize": @{@"width": @(end.size.width), @"height": @(end.size.height)} }];
+        [self fireEvent:@"keyboard" params:@{ @"isShow": @YES, @"keyboardSize": @(end.size.height / self.weexInstance.pixelScaleFactor) }];
     }
     
     _keyboardHidden = NO;