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

[iOS] ScrollView as a child item overlaps the brothers placed to the bottom #15966

Closed
dpozimski opened this issue Jul 2, 2023 · 2 comments
Closed
Labels
area-controls-scrollview ScrollView layout-grid platform/iOS 🍎 s/no-repro Can no longer be reproduced on latest t/bug Something isn't working

Comments

@dpozimski
Copy link

dpozimski commented Jul 2, 2023

Description

ScrollView content overlaps the parent content when it's placed inside other layout component (like Grid, VerticalStackLayout) and so on.
Thanks of that we are not able to add a touchable controls like buttons below the scrollview. Controls placed below are not clickable/touchable and sometimes they are overlapped by the content of scrollview.

XAML File

<?xml version="1.0" encoding="UTF-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="ScrollViewDemos.Views.XAML.BlackCatPage" Title="ScrollView as a child layout demo">
    <Grid Margin="20" RowDefinitions="Auto,*,Auto,Auto">
        <Label Text="THE BLACK CAT by Edgar Allan Poe" FontSize="14" FontAttributes="Bold" HorizontalOptions="Center" />
        <ScrollView x:Name="scrollView" Grid.Row="1" VerticalOptions="Fill" Scrolled="OnScrollViewScrolled">
            <StackLayout>
                <Label Text="FOR the most wild, yet most homely narrative which I am about to pen, I neither expect nor solicit belief. Mad indeed would I be to expect it, in a case where my very senses reject their own evidence. Yet, mad am I not -- and very surely do I not dream. But to-morrow I die, and to-day I would unburthen my soul. My immediate purpose is to place before the world, plainly, succinctly, and without comment, a series of mere household events. In their consequences, these events have terrified -- have tortured -- have destroyed me. Yet I will not attempt to expound them. To me, they have presented little but Horror -- to many they will seem less terrible than barroques. Hereafter, perhaps, some intellect may be found which will reduce my phantasm to the common-place -- some intellect more calm, more logical, and far less excitable than my own, which will perceive, in the circumstances I detail with awe, nothing more than an ordinary succession of very natural causes and effects." />
                <Label Text="From my infancy I was noted for the docility and humanity of my disposition. My tenderness of heart was even so conspicuous as to make me the jest of my companions. I was especially fond of animals, and was indulged by my parents with a great variety of pets. With these I spent most of my time, and never was so happy as when feeding and caressing them. This peculiarity of character grew with my growth, and, in my manhood, I derived from it one of my principal sources of pleasure. To those who have cherished an affection for a faithful and sagacious dog, I need hardly be at the trouble of explaining the nature or the intensity of the gratification thus derivable. There is something in the unselfish and self-sacrificing love of a brute, which goes directly to the heart of him who has had frequent occasion to test the paltry friendship and gossamer fidelity of mere Man." />
                <Label Text="I married early, and was happy to find in my wife a disposition not uncongenial with my own. Observing my partiality for domestic pets, she lost no opportunity of procuring those of the most agreeable kind. We had birds, gold-fish, a fine dog, rabbits, a small monkey, and a cat." />
                <Label Text="This latter was a remarkably large and beautiful animal, entirely black, and sagacious to an astonishing degree. In speaking of his intelligence, my wife, who at heart was not a little tinctured with superstition, made frequent allusion to the ancient popular notion, which regarded all black cats as witches in disguise. Not that she was ever serious upon this point -- and I mention the matter at all for no better reason than that it happens, just now, to be remembered." />
                <Label Text="Pluto -- this was the cat's name -- was my favorite pet and playmate. I alone fed him, and he attended me wherever I went about the house. It was even with difficulty that I could prevent him from following me through the streets." />
                <Label Text="Our friendship lasted, in this manner, for several years, during which my general temperament and character -- through the instrumentality of the Fiend Intemperance -- had (I blush to confess it) experienced a radical alteration for the worse. I grew, day by day, more moody, more irritable, more regardless of the feelings of others. I suffered myself to use intemperate language to my wife. At length, I even offered her personal violence. My pets, of course, were made to feel the change in my disposition. I not only neglected, but ill-used them. For Pluto, however, I still retained sufficient regard to restrain me from maltreating him, as I made no scruple of maltreating the rabbits, the monkey, or even the dog, when by accident, or through affection, they came in my way. But my disease grew upon me -- for what disease is like Alcohol ! -- and at length even Pluto, who was now becoming old, and consequently somewhat peevish -- even Pluto began to experience the effects of my ill temper." />
                <Label Text="One night, returning home, much intoxicated, from one of my haunts about town, I fancied that the cat avoided my presence. I seized him; when, in his fright at my violence, he inflicted a slight wound upon my hand with his teeth. The fury of a demon instantly possessed me. I knew myself no longer. My  original soul seemed, at once, to take its flight from my body; and a more than fiendish malevolence, gin-nurtured, thrilled every fibre of my frame. I took from my waistcoat-pocket a pen-knife, opened it, grasped the poor beast by the throat, and deliberately cut one of its eyes from the socket ! I blush, I burn, I shudder, while I pen the damnable atrocity." />
                <Label Text="When reason returned with the morning -- when I had slept off the fumes of the night's debauch -- I experienced a sentiment half of horror, half of remorse, for the crime of which I had been guilty; but it was, at best, a feeble and equivocal feeling, and the soul remained untouched. I again plunged into excess, and soon drowned in wine all memory of the deed." />
                <Label x:Name="finalLabel" Text="In the meantime the cat slowly recovered. The socket of the lost eye presented, it is true, a frightful appearance, but he no longer appeared to suffer any pain. He went about the house as usual, but, as might be expected, fled in extreme terror at my approach. I had so much of my old heart left, as to be at first grieved by this evident dislike on the part of a creature which had once so loved me. But this feeling soon gave place to irritation. And then came, as if to my final and irrevocable overthrow, the spirit of PERVERSENESS. Of this spirit philosophy takes no account. Yet I am not more sure that my soul lives, than I am that perverseness is one of the primitive impulses of the human heart -- one of the indivisible primary faculties, or sentiments, which give direction to the character of Man. Who has not, a hundred times, found himself committing a vile or a silly action, for no other reason than because he knows he should not? Have we not a perpetual inclination, in the teeth of our best judgment, to violate that which is Law, merely because we understand it to be such? This spirit of perverseness, I say, came to my final overthrow. It was this unfathomable longing of the soul to vex itself -- to offer violence to its own nature -- to do wrong for the wrong's sake only -- that urged me to continue and finally to consummate the injury I had inflicted upon the unoffending brute. One morning, in cool blood, I slipped a noose about its neck and hung it to the limb of a tree; -- hung it with the tears streaming from my eyes, and with the bitterest remorse at my heart; -- hung it because I knew that it had loved me, and because I felt it had given me no reason of offence; -- hung it because I knew that in so doing I was committing a sin -- a deadly sin that would so jeopardize my immortal soul as to place it -- if such a thing were possible -- even beyond the reach of the infinite mercy of the Most Merciful and Most Terrible God." />
            </StackLayout>
        </ScrollView>
        <Button Grid.Row="2" Text="#1 Scroll to end" Clicked="OnButtonClicked" />
        <Button Grid.Row="3" Text="#2 Scroll to end" Clicked="OnButtonClicked" />
    </Grid>
</ContentPage>

#1 Scroll to end button will be visible but it's not clickable.
#2 Scroll to end is not visible.

image

The issue occurs on iOS platform. Android seems to work well.

Steps to Reproduce

  1. git clone https://github.com/dotnet/maui-samples.git
  2. Run the 7.0/UserInterface/ScrollViewDemos sample on iOS platform.
  3. Open the "The Black cat short story" page (BlackCatPage.xaml)
  4. Scroll to end button seems to be moved more to the bottom than it should (in comparison to Android platform) and it's not clickable.

Link to public reproduction project repository

https://github.com/dotnet/maui-samples

Version with bug

7.0.49

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16.4

Did you find any workaround?

unfortunately not,
tried to use Xamarin.Forms legacy renderer for ScrollView but the effect was even worse

Relevant log output

No response

@dpozimski dpozimski added the t/bug Something isn't working label Jul 2, 2023
@dpozimski dpozimski changed the title [iOS] ScrollView as a child item overlaps the brothers placed in the bottom [iOS] ScrollView as a child item overlaps the brothers placed to the bottom Jul 2, 2023
@jsuarezruiz jsuarezruiz added area-controls-scrollview ScrollView platform/iOS 🍎 area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-grid labels Jul 3, 2023
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jul 3, 2023
@ghost
Copy link

ghost commented Jul 3, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@hartez
Copy link
Contributor

hartez commented Jul 7, 2023

This is fixed for service release 7 (which should be landing next week).

@hartez hartez closed this as completed Jul 7, 2023
@samhouts samhouts modified the milestones: Backlog, .NET 7 + Servicing Jul 11, 2023
@samhouts samhouts added the s/no-repro Can no longer be reproduced on latest label Jul 11, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2023
@Eilon Eilon removed the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-scrollview ScrollView layout-grid platform/iOS 🍎 s/no-repro Can no longer be reproduced on latest t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants