Comments (4)
Web stuff is not really my skill set, so any help here would be appreciated.
from egui.
Web stuff is not really my skill set, so any help here would be appreciated.
Would be happy to help. Am I understanding correctly that this is for mobile keyboard input support? Was this behind a feature flag in the past?
If this was for that, what's the intention behind changing the position of the canvas element at all? At a quick glance, it appears the intention would be to slide it up and down to accommodate the keyboard that would slide in on a mobile device but my assumption would be that the keyboard appearing would already have that effect.
from egui.
canselcik@be66734
How about something like this?
Since it is non-trivial accessing some configuration in that closure, I figured this would be a compromise-free option.
If the canvas isn't flush to the upper left corner of the page, pushing it up like it is currently done will result in potentially broken page layout. So if the canvas is flush to the upper left corner, we do what is currently done and then set an attribute on the canvas. We prefix it with data-
as custom attributes doing that is allowed by the HTML5 spec. When the on screen keyboard is gone, we check for that custom attribute, if it is set, we unset it and "restore" the canvas back to the upper left corner of the page.
from egui.
The current workaround is to add some CSS to the canvas:
canvas {
position: initial !important;
top: unset !important;
}
Ideally, egui would never set the style of the canvas element for any reason.
from egui.
Related Issues (20)
- wayland: Dragging out of maximize doesn't resize viewport
- For each Viewport, to store `transparent` and `decoration` information.
- Checkboxes require a mutable reference to an underlying boolean, making display of read-only values awkward HOT 2
- Inconsistent styling options for WidgetVisuals
- Please adopt HTML/Mustache syntax HOT 1
- Visual glitches with shadows with large blur radius
- `Ui::interact`'s `Response` hover detection is incorrect HOT 5
- Window implementation outside of egui HOT 1
- Blurry font rendering in firefox on linux HOT 8
- Provide a way to register native texture in `eframe`
- Zooming/dragging plot on a single axis resets the other axis
- On Wayland, app repaints every frame if IME output is set HOT 1
- eframe0.27 cannot get the drag_and_drop input on fedora 39 gnome HOT 1
- KDE `ViewportCommand::InnerSize` is undone via instantaneous `WindowEvent::Resized` HOT 1
- Ui.collapsing does not work with multiple Ui.collapsing of the same name after version 0.27.0 HOT 4
- Uneven font rendering with artifacts on Firefox on Android
- egui-winit no longer compiling for wasm32 due to `arboard` HOT 1
- Hover only interactions no longer work HOT 3
- After the #4284 update, Viewport graphics are broken. HOT 5
- Add some way to specify whether scroll_to_rect etc.. should be animated HOT 1
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 egui.