UIPageLayout.PageEnter/PageLeave Event not Firing

To keep it minimal:

This is my localscript code:

local PageSystem = lol.UIPageLayout
 PageSystem.PageEnter:Connect(function(Page)
 print(Page.Name)
end)

Upon scrolling through the frame binded to UIPageLayout, the event doesn’t fire, nothing is printed.
(The ‘ClientUI Added’ console print is not related to this issue)

https://gyazo.com/fff79ee4e5a4829ed3d778598d8d5976

I have checked that these ‘pages’ have a valid name and are archivable.

This is the instance hierarchy:
image

Any suggestions to why? Could it be a bug?
This bug-post may be related to UIPageLayout Issues , another user who is also having issues.

19 Likes

This has been happening for a very long time. They broke it in the GUI update and never patched it. You can use the .Stopped event in the meantime.

Someone really should post it as a bug. I’m unable to and it’s been kind of an annoying issue for awhile.

4 Likes

I’ve put this forum into the Bugs repository @CompilerError - hopefully this can get sorted asap.

Additional information for bug catchers:
“UIPageLayout - PageEnter / PageLeave event not firing”.
Studio V : 0.398.0.332127 64Bit,
Personally Identified this behaviour 1hr ago.
Reproducable, Replicate above example/situation.

I highly recommend that the developer wiki disambiguate and define what a ‘Page’ is - and possibly attach a example to it once fixed, it is a very usable UI feature and should be used more often.

2 Likes

You could possibly use the .Stopped event as ComplierError had said, and combine it with using the CurrentPage property. Annoying workaround, but that’s just Roblox.

2 Likes

This is still happening, although I’m able to workaround this it’s very hacky and far from ideal. pls fix

4 Likes

Just going to bump this post again. It needs addressing. I’ve got tabs which should light up when the page is visible, and I want them to light up as it cycles through, rather than just having the selected page’s tab light up.

4 Likes

It seems like the temporary solution is to use GetPropertyChangedSignal and connect it to ‘CurrentPage’ changing to achieve the desired effect as the PageEnter functionality.

Note for bug swatters - this issue can still be reproduced as posted.

3 Likes

This is the solution I opted for in the end. However, it doesn’t cycle through pages as it animates. It only changes to the target page when using JumpTo.

1 Like

I tried using PageEnter earlier today and it seems like it still doesn’t work. It’d be nice if these events worked.

2 Likes

You can do this.

script.Parent.UIPageLayout:GetPropertyChangedSignal("CurrentPage"):Connect(function()
--what you do
end)

its pretty simple and pageleave is possible to recreate aswell.

2 Likes

Is this still happening? I need page leave for knowing when i leave a page and i just found out it doesn’t work. Please address the problem.

1 Like

Hello, this is a bump to this thread. The issue is still ongoing and should really be fixed. :confused:

2 Likes

Bumping this thread, this issue still happening

1 Like

Honestly, at this point the entire UIPageLayout backend coding needs to be polished a bit, It’s a great system but It doesn’t always work as intended. I’ve had several issues where the UI it said it listed as the current UI wasn’t actually displayed on-screen and was instead placed off to the side like it wasn’t an active frame.

2 Likes

This still doesn’t work properly it’s a shame that something simple like this hasn’t been fixed after being reported for more than 2 years

2 Likes

I’m trying to use UIPageLayout for a search gui and I can confirm that the issue is still present.

Both of the events (.PageEnter and .PageLeave) don’t fire and Stopped is kinda useless since I need to be able to clear search results from the pages that aren’t visible as you jump from page to page so players could browse huge quantities of results without their games lagging.

1 Like

Yup just tried using these events but nothing is firing. Issue is still happening :confused:

1 Like

Still happening. Tried using these events and they didn’t work, narrowed down the problem so much that the only possible issue could be the events not firing. And it looks like that’s the case…

1 Like

This is still an issue as of August 2023.

@Tiffblocks If I recall your team works on the UI half, any chance this can be looked at since it’s been awhile since this post was created.