SPFx Application Customizers don't scroll on /_layouts/15 pages and list/library pages
Category
- [ ] Question
- [ ] Typo
- [X ] Bug
- [ ] Additional article idea
I've noticed that application customizers which make use of the header placeholder scroll on SharePoint "site pages" but not on other pages such as site contents or document libraries. You can reproduce this with a standard app customizer https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions and then resize the browser window. This issue seems to effect all browsers but my testing has been in Chrome.
Not working in document library:
Working on site pages:
The issue seems to be the following CSS: .sp-App-root{ overflow:hidden; }
This CSS fixes the issue (but i wouldn't want to touch that CSS in app customizers): .sp-App-root{ overflow-x:hidden; overflow-y:scroll; }
I assume this is built like this for a reason but doesn't take into account customizations which might need scrolling ability especially on mobile devices. I just wondered if other people had this issue and how they got around it?
@VesaJuvonen This is still an issue, do you have any updates on it?
It can be replicated by following the the MS guide:https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions and then setting the header div to 2000px in height.
It will work fine on a page but not on a document library application page.
The CSS fix is: .sp-App-root{ overflow-x:hidden; overflow-y:scroll; }
However, It is bad practice to inject that CSS and this should be fixed globally.
Thanks!
I can confirm that I see the scrolling on Home Page, but don't see on Doc Lib, List, or Site Content
Hi @CloudDesignBox - sorry for the long delay. We've taken a good look at this, and we're going to close this without fixing it, mostly because the fix would be to make both experiences "broken" by your definition. The problem is that the design of the top placeholder is that is sits above the scrollable content region, it isn't a part of it. In this case, the header is so large that it has pushed all the content out of the viewport, so the scrollable content region can't be seen. The solution here is to make your header smaller so that it is mobile friendly.
Thank you for the update @patmill. I appreciate your thinking around this that they placeholder cannot be larger than the viewport. I guess for us, we need to render the menu using relative css over the contents rather than push it down as a solution. I think this was raised because it worked differently on pages as it did on document libraries.
Hi @CloudDesignBox - this bug is about scrolling of application customizers on the pages. For the one that you're mentioning - you are correct. We're working on it to make them visible all the time.
Thanks @AJIXuMuK
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues