Hi,

thanks for the code, now I understand the problem and you correctly pointed out 
in your last message that it works fine with text.

The reason is that the <img> element is asynchronous by nature. You create a 
<img> with a src attribute and then the browser sends a request to load the 
image. This takes a while. 
In the meantime you already added the qx.ui.mobile.embed.Html to your page so 
the browser cannot know the actual size of the qx.ui.mobile.embed.Html because 
the image hasn’t finished loading yet.

Solution:

Extend your __updateHtmlContent() method like this:

                this.__htmlContent.setHtml("<img 
src='http://hostingride.com/wp-content/uploads/2014/07/microsoft_xp_bliss_desktop_image-650x0.jpg'></img>");

                var imgElement = 
this.__htmlContent.getContentElement().children[0];
                imgElement.onload = function() {
                  this._domUpdated();
                }.bind(this);

It attaches a handler to the <img>’s load event. As soon as the image is 
loaded, _domUpdated() is triggered, so that the layout is refreshed. 

Best,
Andreas   

Am 03.09.2014 um 13:02 schrieb Dragonheart <dragonheart...@gmail.com>:

> I'll continue speaking with myself :)
> 
> This problem is only actual for embed html with image. If instead of an
> image I place lot's of text - it's scrolled ok from the first try without
> reloading the page.
> 
> 
> 
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/Scrolling-and-zooming-on-different-mobile-devices-tp7585347p7586135.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Slashdot TV.  
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to