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

Scrollbar is displayed after ScrollView is disabled and re-enabled, even if content fits in view. #5704

Open
DevanEngland opened this issue Nov 7, 2019 · 2 comments

Comments

@DevanEngland
Copy link

@DevanEngland DevanEngland commented Nov 7, 2019

Creator version?(版本号)

v2.1.2

Affected platform?(受影响的平台)

Web, but probably all platforms

How to reproduce?(如何重现)

  • Create a new ScrollView with a Scrollbar.
  • Set the content to be smaller than the view.
  • Set up a button that toggles the 'active' flag of the ScrollView's node or one of its parents.
  • View the ScrollView at runtime and note that the Scrollbar is (correctly) hidden.
  • Use the button to make the ScrollView inactive and then active again.
  • Observe that the Scrollbar is (incorrectly) visible. This is particularly noticeable if Auto-Hide is turned off.

JavaScript output or error produced?(报错信息和调用栈)

There is no error output as this is a logic bug within the CCScrollView class.

Demo project?(demo 项目)

ScrollbarBugReproProject.zip

@holycanvas

This comment has been minimized.

Copy link
Contributor

@holycanvas holycanvas commented Nov 21, 2019

Please try the lastest version

@holycanvas

This comment has been minimized.

Copy link
Contributor

@holycanvas holycanvas commented Nov 21, 2019

I have try it in v2.2.0, it worked fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.