You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/09/26 04:25:23 UTC

[21/47] incubator-weex git commit: * [html5] fix return event of input component on android UC browser.

* [html5] fix return event of input component on android UC browser.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/0ae0fcfa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/0ae0fcfa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/0ae0fcfa

Branch: refs/heads/dev
Commit: 0ae0fcfaf0ae3a2802a76f5aeb6d7b2c53978af5
Parents: 125f17d
Author: MrRaindrop <te...@gmail.com>
Authored: Mon Sep 4 18:20:46 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Mon Sep 4 18:20:46 2017 +0800

----------------------------------------------------------------------
 html5/render/vue/mixins/input-common.js |  6 +++---
 vue.html                                | 15 +++++++++------
 2 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0ae0fcfa/html5/render/vue/mixins/input-common.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/mixins/input-common.js b/html5/render/vue/mixins/input-common.js
index f5fa18b..db86079 100644
--- a/html5/render/vue/mixins/input-common.js
+++ b/html5/render/vue/mixins/input-common.js
@@ -46,10 +46,10 @@ export default {
         const keyboardEvents = {
           'keyup': function (ev) {
             const code = ev.keyCode
-            let key = ev.key
+            const key = ev.key
             if (code === 13) {
-              if (key.toLowerCase() === 'tab') {
-                key = 'next'
+              if (!key || key.toLowerCase() === 'tab') {
+                ev.key = 'next'
               }
               const rightKeyType = findEnterKeyType(customKeyType)
               ev.returnKeyType = rightKeyType

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0ae0fcfa/vue.html
----------------------------------------------------------------------
diff --git a/vue.html b/vue.html
index aa8b353..f403a2f 100644
--- a/vue.html
+++ b/vue.html
@@ -44,21 +44,24 @@
       opacity: 0.7;
     }
   </style>
-
+</head>
+<body>
+  <div id="root"></div>
+  <!-- <script>
+    window.onerror = function (err) {
+      alert('error!' + JSON.stringify(err))
+    }
+  </script> -->
   <!--<script src="./node_modules/vue/dist/vue.runtime.min.js"></script>-->
-  <script src="./node_modules/vue/dist/vue.runtime.js"></script> 
+  <script src="./node_modules/vue/dist/vue.runtime.js"></script>
   <!--<script src="dist/vue.runtime.js"></script> -->
   <!-- <script src="./node_modules/weex-vue-render/index.min.js"></script> -->
   <script src="./packages/weex-vue-render/dist/index.js"></script>
   <!--<script src="./dist/render.vue.js"></script>-->
   <!--<script src="./dist/render.vue.min.js"></script>-->
   <!--<script src="./packages/weex-vue-render/dist/index.min.js"></script>-->
-
   <!--This line is only used to run weex-picker example,you can remove this line when you do not need weex-picker module-->
   <script src="./node_modules/@weex-project/weex-picker/js/build/index.js"></script>
-</head>
-<body>
-  <div id="root"></div>
   <script>
     /**
      * these iife is just for the convenience for the showcase of demos.