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

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

YorkShen closed pull request #1522: [WEEX-612][android] Fixed after input 
component default set  a string…
URL: https://github.com/apache/incubator-weex/pull/1522
 
 
   

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/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
index d6885f83ce..aff7a1ed12 100644
--- 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
@@ -348,6 +348,7 @@ public void beforeTextChanged(CharSequence s, int start, 
int count, int after) {
         public void onTextChanged(CharSequence s, int start, int before, int 
count) {
           if (mIgnoreNextOnInputEvent) {
             mIgnoreNextOnInputEvent = false;
+            mBeforeText = s.toString();
             return;
           }
 


 

----------------------------------------------------------------
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]


> Android手机上input控件默认设置一个字符串后,然后清除不能触发input事件
> -------------------------------------------
>
>                 Key: WEEX-612
>                 URL: https://issues.apache.org/jira/browse/WEEX-612
>             Project: Weex
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 0.18
>         Environment: weex  0.18.0    、android 小米3  6.0系统
>            Reporter: tody
>            Assignee: YorkShen
>            Priority: Major
>              Labels: input
>
> 1、weex测试demo:
> {code:java}
> <template>
> <div>
> <text style="font-size: 40px">oninput: {{txtInput}}</text>
> <input type="text" placeholder="Input Text" class="input" :value="txtInput" 
> :autofocus=true @input="oninput"/>
> </div>
> </template>
> <style scoped>
> .input {
> font-size: 60px;
> height: 80px;
> width: 750px;
> }
> </style>
> <script>
> var modal = weex.requireModule('modal')
> module.exports = {
> data: function () {
> return {
> txtInput: '外',
> };
> },
> methods: {
> oninput: function (event) {
> this.txtInput = event.value;
> modal.toast({
> message: "input: "+event.value
> })
> }
> }
> };
> </script>
> {code}
>  
> 2、android清除input元素,input事件没有触发。
>  



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

Reply via email to