[ 
https://issues.apache.org/jira/browse/WEEX-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16642762#comment-16642762
 ] 

ASF GitHub Bot commented on WEEX-504:
-------------------------------------

Hanks10100 closed pull request #1364: [WEEX-504][iOS] <textarea> set 
:active,placeholder display when activ…
URL: https://github.com/apache/incubator-weex/pull/1364
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m 
b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
index 24ee17f0ad..21769016d0 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
@@ -185,6 +185,11 @@ -(void)setEditBorder:(UIEdgeInsets)border
 
 -(void)setAttributedPlaceholder:(NSMutableAttributedString *)attributedString 
font:(UIFont *)font
 {
+    if ([_textView.text length] > 0) {
+        self.placeHolderLabel.text = @"";
+        return;
+    }
+
     if (self.placeholderColor) {
         [attributedString addAttribute:NSForegroundColorAttributeName 
value:self.placeholderColor range:NSMakeRange(0, 
self.placeholderString.length)];
         [attributedString addAttribute:NSFontAttributeName value:font 
range:NSMakeRange(0, self.placeholderString.length)];


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> textarea 设置 :active伪类,placeholder不消失
> ------------------------------------
>
>                 Key: WEEX-504
>                 URL: https://issues.apache.org/jira/browse/WEEX-504
>             Project: Weex
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 0.12, 0.19
>            Reporter: jiangbin
>            Assignee: XuYouyang
>            Priority: Major
>
> textarea 设置 :active伪类,placeholder不消失,与当前文字叠加显示
> demo参考[http://dotwe.org/vue/c45ae83c092e7ca988ffc6952077d10a]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to