Comments (9)
@Schahen, could you please look at it?
from compose-multiplatform.
Hey @Schahen jan, any idea what can be the reason? Also, as you can see from the 3rd screenshot of Andrpoid phone Chrome the tip part is cut(the website is not scrolled, it shows its top). Can't release unless the responsive UI works correct. This is the only blocker.
from compose-multiplatform.
@hayk-kerobyan ջան we'll do our best to fix this ASAP, will keep you posted
from compose-multiplatform.
@hayk-kerobyan it looks like I need additional information. To be 100% sure I'm looking into the same issue that is actually reported. So, first of all -
- issue is about the js target (not the wasm one)?
- what exactly happens at step "See error the value returned by the function is not correct in mobile browsers.
or" - is it a runtime error one can see in console or an error in that sense that application get incorrect dimensions? - which browsers are affected on mobile?
I'm checking https://passaporteaupair.com/ but failing to see something that's wrong
from compose-multiplatform.
-
Target is JS(screenshot attached, source code)
-
To make things easier:
With the following code I am getting the screen width 979.dp on Pixel 6A, however, running a native android application on the same device shows that the screen width is 411.dp which must be the correct width of the screen(device)
- Browsers affected:
- Android Chrome
- Android Firefox
- iOS Chrome
- iOS Safari
In addition, for some reason the screen is shifted up only on Android Chrome (as if there is offsetY = -300.dp) which makes the top part of the composable be cut.
from compose-multiplatform.
Btw, the density from LocalDensity.current.density
method is returned correct(although there is a small difference: for the same screen android Chrome and Firefox returned 2.625 and 2.608 respectively)
However, LocalWindowInfo.current.containerSize.width
returned 2572 px on Android Chrome and 2556 px on Android Firefox while the native android application returned 1080 px using currentWindowSize().width
method from androidx.compose.material3.adaptive:adaptive library.
Apparently the problem is in the width value of this method LocalWindowInfo.current.containerSize.width
. The browser container itself seems to work correct as the content composable doesn't go beyond the screen (to the right of the screen) except the only case mentioned in my previous message for android Chrome.
from compose-multiplatform.
@Schahen jan, my bad I modified the index.html to the following and it started to work. Aparently it's not an issue on Compose multiplatform, it's just a matter of the index.html
config. The top part of the website is cut on Chrome when desktop mode is being enabled, however this is an another issue, for which I will try to find a sollution. Closing the issue. Sorry for inconvenience.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Passaporte AuPair</title>
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
#root {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: #f0f0f0;
}
</style>
<script src="skiko.js"></script>
</head>
<body>
<div id="root"></div>
<script src="composeApp.js"></script>
</body>
</html>
from compose-multiplatform.
@hayk-kerobyan ջա՜ն Thank you very much for investigating! It's actually still the problem of our API that people keep in mind all this meta/viewport related issues. We'll try to come up with something that will make developers live easier in that aspect.
from compose-multiplatform.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
from compose-multiplatform.
Related Issues (20)
- [1.7.0-alpha01] GraphicsLayer do not seems to like being drawn multiple times HOT 4
- MacOS Notarize App with Native Library Failed Error 65 HOT 4
- [1.7.0-alpha01] Moving after initiating a click cancels it HOT 2
- Preview in commonMain? HOT 2
- [1.7.0-alpha01] Cannot change attributes of dependency configuration ':debugFrameworkIosArm64' after it has been resolved HOT 9
- I have an issue with a common ViewModel and navigation in my Compose Multiplatform application HOT 3
- Ios crash while using textMeasurer.measure inside Dispatchers.Default HOT 17
- CompositionLocalProvider related RuntimeError: illegal cast HOT 7
- Compose navigation crash v2.8.0-alpha08 (UnsatisfiedLinkError) HOT 5
- Support common `org.jetbrains.compose.ui.tooling.preview.Preview` in IDEA and Android Studio HOT 17
- ShadowJar Executable HOT 2
- Error: self-signed certificate in certificate chain HOT 5
- Improved window sizing API (Windows) HOT 3
- iOS Keyboard Broken with `readOnly` will show/hide in loop HOT 13
- iOS: ModalBottomSheet can't ignore safeArea HOT 2
- Unable to run tests using Multiplatform Resources HOT 2
- Make AnnotatedString.Companion.fromHtml available to multiplatform HOT 3
- [WASM] Custom Font Text flickering from tofu to the actual text with the right font HOT 4
- Previewing fails with AssertionError: Data is too big HOT 3
- Important: please use YouTrack for bugs and feature requests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-multiplatform.