-
Notifications
You must be signed in to change notification settings - Fork 104
[ObjectPageTitle]: pseudo has() limited browser support - breaks UI in Android devices #6979
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
Comments
Hi @amdev138 UI5 Web Components for React is following the browser support of UI5 Web Components, therefore the latest two versions of all major browsers will be supported.
Your link shows that all of these Browsers support this feature. Also, it's not only used in our project, but in ui5-webcomponents as well. Unfortunately, we can't offer support for "niche" or legacy Browsers, that's why I'm closing this issue. |
Hi @Lukas742 , In SF Mobile App, some of the pages are a hybrid web page. This is done via webView and if anyone has a device two years old (fairly common) it will use Chromium <105 in which const toolbarContainer = toolbarContainerMutation.target as HTMLDivElement;
// Find the last child element and ensure there are at least two children
if (toolbarContainer.children.length >= 2) {
const lastChild = toolbarContainer.lastElementChild as HTMLElement;
// Check if the last child is a [ui5-toolbar]
if (lastChild && lastChild.matches('[ui5-toolbar]')) {
// Iterate over the children of the navigation toolbar
Array.from(lastChild.children).forEach((item) => {
item.setAttribute('overflow-priority', 'NeverOverflow');
});
}
} Why not even consider this small ask? |
@amdev138 |
@Lukas742 , These other Chrome<105 issues you mentioned - are these all page breaking issues that would block the functionality of the entire app just like this? What is the worst that could happen if you were to patch the ObjectPageTitle so that it didn't just crash the entire app by using some alternative to this Imagine of SuccessFactors were to polyfill the This PopoverAPI thing - does that mean that Popups won't show up? |
Hi @codefactor, @amdev138 and @ilhan007 (fyi) It's not that we don't want to help you, but I have concerns that fixing this issue might only be the first of many that arise due to unsupported APIs. The
I can't say for sure, but if we expect a property to be available when it isn't, it could cause an error that breaks the entire app, especially if no error boundaries are in place. Even if the app is not crashing, the component using the unsupported feature will not work or look as intended though.
Patching this single instance wouldn’t be an issue, but we cannot guarantee that the component will work even with the fix. E.g. since the Popover API is not supported and the
I believe the component will at least crash, possibly even the whole page, but I haven’t tested it myself. Also, could you elaborate on this statement?
I didn't read into this in detail, but it seems that since Android v7 (2016) WebView is updated through the Google Play Store independently of the OS, so users can just update WebView to a version that supports Chromium well past version 105. So, this should only be a problem for devices using Android < v7 which I can't believe is a huge number. Please don't hesitate to correct me if I'm wrong though, as I'm not familiar with Android update policies and WebView support. |
@Lukas742 , |
I will test if replacing Could you please define the exact version of WebView were this feature is not supported, so we can document this internally? |
Hello Scott @codefactor, As Lukas mentioned, this might be the first of several issues. One key point to consider is the Popover API, which was introduced in UI5 Web Components version 2. This API has been supported since Chrome 114. If you are using version 2 with a Chrome version below 114, popups will not be displayed at all. And it's not something that can be addressed (in v2, with v1 it would not be a problem). I understand this may be inconvenient, but the solution would be to update your WebView, which can be done independently via the Google Play Store. Could you share the device and Android OS version you are using, as well as any challenges you might be facing with updating? BR, |
Hi @amdev138 Allen, I assume that you will have popups in this apps/pages. and just to note it again in case you missed it, that the popover API (all ui5 web components popups in v2 are now based on it, replacing the static area approach from v1) can't work if these minimum requirements are not met:
For devices on Android OS >7, you can update/ suggest updating to a newer Chrome/WebView versions Unfortunately, there is not polyfill for the Popover API to workaround this. |
Hi @ilhan007 , |
Describe the bug
Hi team,
There are a couple lines of code in ObjectPageTitle/index.tsx#L172 that execute
querySelector
using the pseudo has() css selector. This selector is not widely supported. In Android devices you will get a runtime exception such as,and this exception will cause the entire page to not render.
Please use an alternative selector that is commonly supported across all devices/browsers.
https://caniuse.com/css-has
Thanks,
Allen
Isolated Example
No response
Reproduction steps
Expected Behaviour
No response
Screenshots or Videos
No response
UI5 Web Components for React Version
main
UI5 Web Components Version
main
Browser
Chrome, Edge, Firefox, Safari
Operating System
No response
Additional Context
No response
Relevant log output
Organization
SF
Declaration
The text was updated successfully, but these errors were encountered: