Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

哈~ 还是找到bug了, swipeAction滑动锁逻辑有缺陷~~ #1954

Closed
deepkolos opened this issue Oct 18, 2017 · 17 comments · Fixed by react-component/swipeout#56
Closed
Assignees

Comments

@deepkolos
Copy link

deepkolos commented Oct 18, 2017

Version

2.0.0-rc.2

Environment

win10 1703 chrome 61 stable

Reproduction link

http://beta.mobile.ant.design/kitchen-sink/components/swipe-action?lang=zh-CN

Steps to reproduce

see in gif
在chrome dev 设置 #react-content 的height: 200vh;

What is expected?

无论有/没滚动条的时候, 都需要判断开始滑动的方向
如果是垂直滑动, 就冒泡到父节点, 不触发横向滚动逻辑,
如果是横向滚动就阻止冒泡, 触发横向滚动逻辑~

What is actually happening?

see in gif

bug4

@ant-design-bot
Copy link

It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.
See: ant-design/ant-design#4897

@deepkolos deepkolos changed the title 哈~ 还是找到bug了, swipeAction没有做滑动锁~~ 哈~ 还是找到bug了, swipeAction滑动锁逻辑有缺陷~~ Oct 18, 2017
@paranoidjk
Copy link
Contributor

@deepkolos
Copy link
Author

deepkolos commented Oct 18, 2017

还有一个不知道算不算问题~
就是, 直接横向滚动的时候, 在cell内滚动流程, 但是当把手指挪到cell外变卡顿~

bug5

这是我自己认为比较合理的行为~ (其实我发现好多开源的组件框架都没把swipe行为定义好~ 下面是自己修改后的~ 基于vue

show0

个人觉得, swipelock的事件定义是指, 只要一开始符合了条件, 事件将会锁定在该组件, 就是不会往上冒泡, 不符合就, 继续冒泡咯~

看了一下, 所提供链接的swipelock的逻辑, 怎么会放在touchend来处理的捏? 感觉奇怪啊, 不是应该放在touchmove的开始的时候做判断的么?

这是我的swipelock的逻辑, 一个vue的derctive来的, 仅仅做swipe的事情~
https://github.com/deepkolos/we-vue/blob/master/src/custom/event/swipe.js

@paranoidjk
Copy link
Contributor

@zhang740 看下?评估下,如果不是致命的问题,改动又比较麻烦的,可以放到 2.x 的后面迭代去慢慢优化

@zhang740
Copy link
Contributor

预计 2.1 处理吧,m-tabs也有个相关问题。

@zhang740
Copy link
Contributor

react-component/m-tabs#7

@silentcloud
Copy link
Contributor

@paranoidjk @zhang740 这个问题不大,不影响主功能,放在 2.1 着重搞

@justLearner
Copy link

image
为什么不能把自提换成icon

@silentcloud silentcloud mentioned this issue Oct 21, 2017
2 tasks
@FrankFei
Copy link

FrankFei commented Nov 7, 2017

这个问题在1.x时我提过,中间有段时间修复好了,现在我升级到2.0.2后,在ListView中使用SwipeAction时,会触发上下滑动,用户体验不太好!

@warmhug
Copy link
Contributor

warmhug commented Dec 4, 2017

@deepkolos 请问你邮箱多少?有换工作想法吗?欢迎邮箱私聊 :-D

@deepkolos
Copy link
Author

@warmhug 😄 我的邮箱 [email protected] 现在大三~

@warmhug warmhug removed this from the 2.1.0 milestone May 11, 2018
@likezero
Copy link
Contributor

@quentinyang ref #1974 和这个很像

@quentinyang quentinyang self-assigned this May 23, 2018
@quentinyang
Copy link
Contributor

quentinyang commented May 24, 2018

已经修复,主要推动依赖的rc-gesture和swipeout两个组件修复:

  1. 修复touchmove的时候会触发scroll
  2. 修复touchmove离开目标时会出现卡顿的现象
  3. 修复两只手指同时移动同一个目标会出现按钮无法复原的问题

坐等rc-swipeout npm包更新

@warmhug
Copy link
Contributor

warmhug commented May 25, 2018

@quentinyang 搞好了就尽快验证更新哈

@quentinyang
Copy link
Contributor

已验证修复

@quentinyang
Copy link
Contributor

rc-gesture的滚动问题引起其他问题。重新打开issue。

quentinyang added a commit to react-component/swipeout that referenced this issue Jun 4, 2018
As rc-gesture revert preventDefault in v0.0.19 for tabs+listview issue (ant-design/ant-design-mobile#2589).
So, [email protected] fixed this issue by exposing the `event` as a property of Gesture object, and the Gesture object will be passed as the first parameter when invoked panMove event callback.
Then, `rc-swipeout` invokes `event.preventDefault()` to prevent scroll event when pan moving.
quentinyang added a commit to react-component/swipeout that referenced this issue Jun 4, 2018
As rc-gesture revert preventDefault in v0.0.19 for tabs+listview issue (ant-design/ant-design-mobile#2589).
Then, [email protected] fixed this issue by exposing the `event` as a property of Gesture object, and the Gesture object will be passed as the first parameter when invoked panMove event callback.
So, `rc-swipeout` invokes `event.preventDefault()` to prevent scroll event when pan moving.
ziluo pushed a commit to react-component/swipeout that referenced this issue Jun 6, 2018
* fix: ant-design/ant-design-mobile#1954
As rc-gesture revert preventDefault in v0.0.19 for tabs+listview issue (ant-design/ant-design-mobile#2589).
Then, [email protected] fixed this issue by exposing the `event` as a property of Gesture object, and the Gesture object will be passed as the first parameter when invoked panMove event callback.
So, `rc-swipeout` invokes `event.preventDefault()` to prevent scroll event when pan moving.

* change version to 2.0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants