Comments (10)
The problem lies in PopupViewImpl doCenter() method.
private void doCenter() {
boolean wasVisible = asPopupPanel().isShowing();
asPopupPanel().center();
if (!wasVisible) {
asPopupPanel().hide();
}
}
The method is using the GWT's PopupPanel center() method which state:
"Centers the popup in the browser window and shows it. If the popup was already showing, then the popup is centered."
To resolve the issue, we would need to implement doCenter() without relying on PopupPanel
from gwtp.
Good catch.
I saw this too recently some else was having issues on centering.
from gwtp.
from gwtp.
The fix I made does not fix the issue #13 as it seem to be more related to the CSS not being loaded when the getOffsetWidth() is called in doCenter().
from gwtp.
I think it solves one issue, shifting after its slightly rendered.
I noticed that it adds to the dom by root event, and then centers. But it would be nice to add more controls to that event process. It seems that the timing to attaching to the dom and center is fussy, in relation to the css, but I wanted to explore that more.
from gwtp.
One of my thoughts was instead of solving it, give control on when the centering occurs through the event, two step process, or see if I could wait for attaching event then center, but I wasn't sure that occurred before or after rendering of css.
from gwtp.
If the element is not attached when you try to center it, isn't that normal that the css is not taken into account for the calculs?
from gwtp.
Good point, it would have to be attached to get the width and height for calcs.
from gwtp.
Trying to find my source, but I was testing it out: http://gwtp-sandbox.appspot.com/
from gwtp.
I'm going to close this issue since fix was merged. I haven't heard anything on this for a while. I think we can iterate improvements as they come up.
This issue can be used to research the popup in closer detail in the future and help make improvements in the future.
#13
from gwtp.
Related Issues (20)
- JAX-RS interfaces without RestAction wrappers HOT 1
- ServiceException handling in AbstractDispatchServiceImpl
- links in documentation lead to 404
- Compile failure path for type 'com.gwtplatform.mvp.client.GeneratedMvpEntryPoint' HOT 2
- NestedSlots for presenters.. HOT 5
- Bind constants in superdev mode - cache problem?
- Is GWTP Still Maintained? HOT 11
- Testing a presenter with a DispatchAsync dependency
- GeneratedGwtpModule HOT 3
- @GenEvent tag doesn't manage generic event
- memory leak in PopupViewImpl HOT 1
- Upgrade slot tool when migrating from GWTP 1.4 to 1.6
- Multiple entry points connected to different addresses or URL's
- Calling RestDispatchAsyncModule.Builder.core().responseDeserializer() has no effect on the binding HOT 2
- Issue with PlaceManager in abstract Presenter HOT 1
- RestDispatch: Missing servlet response message on error HOT 1
- Gatekeeper with custom reveal method
- Is there any sample to using ltgt maven plugin? HOT 1
- Upgrade com.google.gwt : 2.8.0 -> 2.9.0 HOT 6
- http://dev.arcbees.com/ throws 500 HOT 3
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 gwtp.