Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] ScrollView ScrollOrientation.Neither not working properly #8497

Open
mattleibow opened this issue Nov 14, 2019 · 2 comments
Open

[Bug] ScrollView ScrollOrientation.Neither not working properly #8497

mattleibow opened this issue Nov 14, 2019 · 2 comments
Labels
e/4 🕓 4 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested p/Android p/iOS 🍎 t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@mattleibow
Copy link
Contributor

mattleibow commented Nov 14, 2019

Description

ScrollView doesn't quite behave as expected when changing the orientation to Neither. I have a scroll view, with a stack layout that has 2 items (probably not important). One of the items is very tall.

By default, the big item causes the scroll view to scroll as expected.

If I set the orientation to neither in the page constructor or in XAML, Android goes weird and resizes my big view and my touch events are all mixed up for my canvas view. iOS does not resize my view, and my touch events are fine. It is almost as if the Android view is scrolling, but not actually :)

The other side of this is when I set the orientation later on, such as in a button click. Both platforms just ignore this change and still keep scrolling.

side bug: UWP scrollview padding is just plain evil. In fact, I think the scroll orientation seems to be affecting the padding on all platforms... This might need more testing and a new bug.

Steps to Reproduce

<ScrollView x:Name="scroller" Padding="20,60" BackgroundColor="Orange">
    <StackLayout>
        <Button Clicked="OnBtn" Text="Disable Scroll" BackgroundColor="Red" TextColor="Green" />
        <BoxView BackgroundColor="Green" WidthRequest="200" HeightRequest="3000" />
    </StackLayout>
</ScrollView>
private void OnBtn(object sender, EventArgs e)
{
	scroller.Orientation = ScrollOrientation.Neither;
}

Expected Behavior

ScrollView.Orientation = Neither always disables scroll, and does not resize contents.

Actual Behavior

Android:

  • resizes contents when set in xaml and constructor
  • does not stop scroll when set after rendered

iOS & UWP:

  • does not stop scroll when set after rendered

Basic Information

  • Version with issue: 4.3.0.947036
  • Last known good version: N/A
  • IDE: VS 2019 for Mac
  • Platform Target Frameworks:
    • iOS: 12.3.1
    • Android: 10
    • UWP: Not tested yet
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

Android (late disable ignored) iOS (late disable ignored) UWP (late disable ignored)
android-late-disable ios-late-disable uwp-late-disable
Android (box height ignored) iOS (box height respected) UWP (box height respected)
android-disabled ios-disabled uwp-disabled

Reproduction Link

@mattleibow mattleibow added t/bug 🐛 s/unverified New report that has yet to be verified labels Nov 14, 2019
@pauldipietro pauldipietro added this to New in Triage Nov 14, 2019
@hartez hartez added p/Android p/iOS 🍎 e/4 🕓 4 and removed s/unverified New report that has yet to be verified labels Nov 14, 2019
@hartez hartez added this to To do in Android Ready For Work via automation Nov 14, 2019
@hartez hartez added this to To do in iOS Ready For Work via automation Nov 14, 2019
@hartez hartez removed this from New in Triage Nov 14, 2019
@charlesroddie
Copy link

@AxelUser

@samhouts samhouts added inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! and removed inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! labels Jul 17, 2020
@samhouts samhouts added inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! and removed inactive Issue is older than 6 months and needs to be retested labels Jul 31, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts added this to To do in vNext+1 (5.0.0) Aug 14, 2020
@samhouts samhouts added the inactive Issue is older than 6 months and needs to be retested label Sep 18, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@vchelaru
Copy link

vchelaru commented Jun 8, 2022

I'd like to add a related bug here. If the ScrollView's Orientation is set to ScrollOrientation.Neither, I would expect that controls inside the ScrollView behave as if they are not in a scroll view at all. Specifically, for SKCanvasViews, that means that the SKTouchAction.Cancelled ActionType should not be raised, and the SKCanvasView should continue receiving Move actions when the user has moved vertically. However, currently the Cancel event is sent, and further Move events no longer get sent if the user moves too far horizontally.

This behavior makes it very difficult to add objects to a SKCanvasView which can scroll vertically, while the page can scroll horizontally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e/4 🕓 4 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested p/Android p/iOS 🍎 t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
Development

No branches or pull requests

5 participants