Upgrade for offsetWidth?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrade for offsetWidth?

Matt Davis - NOAA Federal
Hi Qooxdoo dev team,

I've been getting this warning in Chrome:

'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details.

​Will there be an update available to handle this? It seems to be in a core DOM function which determines if a target is visible.

Thanks,
Matt​

--
IRIS/iNWS Technical Lead
Decision Support Branch
Meteorological Development Lab
Office of Science and Technology Integration
National Weather Service, La Crosse, WI
(608) 406-0537


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

oetiker
Hi Matt

Yesterday Matt Davis - NOAA Federal wrote:

> Hi Qooxdoo dev team,
>
> I've been getting this warning in Chrome:
>
> 'SVGElement.offsetWidth' is deprecated and will be removed in M50, around
> April 2016. See https://www.chromestatus.com/features/5724912467574784 for
> more details.
>
> ​Will there be an update available to handle this? It seems to be in a core
> DOM function which determines if a target is visible.
>
> Thanks,
> Matt​
>
I have not seen this warning yet im my code. Can you try producing
a minimal example on playground triggering this warning ...

cheers
tobi


--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch [hidden email] +41 62 775 9902

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

lqip32
Hi Tobias. 
I created the issue about this behavior two weeks ago. 
You could use the example from this issue http://bugs.qooxdoo.org/show_bug.cgi?id=9255

On Mar 21, 2016, at 10:43 AM, Tobias Oetiker <[hidden email]> wrote:

Hi Matt

Yesterday Matt Davis - NOAA Federal wrote:

Hi Qooxdoo dev team,

I've been getting this warning in Chrome:

'SVGElement.offsetWidth' is deprecated and will be removed in M50, around
April 2016. See https://www.chromestatus.com/features/5724912467574784 for
more details.

​Will there be an update available to handle this? It seems to be in a core
DOM function which determines if a target is visible.

Thanks,
Matt​


I have not seen this warning yet im my code. Can you try producing
a minimal example on playground triggering this warning ...

cheers
tobi


--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch [hidden email] +41 62 775 9902
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Dietrich Streifert
Hi All,

I've run Alexanders playground example and can confirm the issue with Chrome 50.0.2661.37 beta-m (64-bit), which is the newest beta release.

I'm currently not using any svg images. Maybe someone wo is using svg could please identify where the deprecated call el.offset is happening?

Regards
Dietrich

Am 21.03.2016 um 09:58 schrieb Alexander Kirsanov:
Hi Tobias. 
I created the issue about this behavior two weeks ago. 
You could use the example from this issue http://bugs.qooxdoo.org/show_bug.cgi?id=9255



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Dietrich Streifert
And here is the corresponding issue for jQuery:

https://github.com/jquery/jquery/issues/2895



Am 21.03.2016 um 11:41 schrieb Dietrich Streifert:
Hi All,

I've run Alexanders playground example and can confirm the issue with Chrome 50.0.2661.37 beta-m (64-bit), which is the newest beta release.

I'm currently not using any svg images. Maybe someone wo is using svg could please identify where the deprecated call el.offset is happening?

Regards
Dietrich

Am 21.03.2016 um 09:58 schrieb Alexander Kirsanov:
Hi Tobias. 
I created the issue about this behavior two weeks ago. 
You could use the example from this issue http://bugs.qooxdoo.org/show_bug.cgi?id=9255




------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

lqip32
I found the issue in the qx.bom.element.Location. 
The issue happens in the method get, the qooxdoo gets the elem.offsetWidth and elem.offsetHeight, but elem could be an instance of the SVGElement. So, I suppose that the qx should check is it svgelement or not and using the element.getBBox().width instead of elem.offsetWidth in case of SVG. But I’m not sure that it is good solution. 

 
On Mar 21, 2016, at 2:28 PM, Dietrich Streifert <[hidden email]> wrote:

And here is the corresponding issue for jQuery:

https://github.com/jquery/jquery/issues/2895



Am 21.03.2016 um 11:41 schrieb Dietrich Streifert:
Hi All,

I've run Alexanders playground example and can confirm the issue with Chrome 50.0.2661.37 beta-m (64-bit), which is the newest beta release.

I'm currently not using any svg images. Maybe someone wo is using svg could please identify where the deprecated call el.offset is happening?

Regards
Dietrich

Am 21.03.2016 um 09:58 schrieb Alexander Kirsanov:
Hi Tobias. 
I created the issue about this behavior two weeks ago. 
You could use the example from this issue http://bugs.qooxdoo.org/show_bug.cgi?id=9255



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Cajus Pollmeier
It would be better to use the qooxdoo SVG contribution instead of
injecting SVGs manually. We've an application that makes heavy use of
SVG and even if you modify this one (i.e. use the proposed bounding box
object), you will run into various other locations in the code where
you've to distinguish between SVG and non SVG elements.

Am Montag, den 21.03.2016, 14:38 +0300 schrieb Alexander Kirsanov:

> I found the issue in the qx.bom.element.Location. 
> The issue happens in the method get, the qooxdoo gets the
> elem.offsetWidth and elem.offsetHeight, but elem could be an instance
> of the SVGElement. So, I suppose that the qx should check is it
> svgelement or not and using the element.getBBox().width instead of
> elem.offsetWidth in case of SVG. But I’m not sure that it is good
> solution. 
>
>  
> > On Mar 21, 2016, at 2:28 PM, Dietrich Streifert <dietrich.streifert
> > @googlemail.com> wrote:
> >
> > And here is the corresponding issue for jQuery:
> >
> > https://github.com/jquery/jquery/issues/2895
> >
> >
> >
> > Am 21.03.2016 um 11:41 schrieb Dietrich Streifert:
> > > Hi All,
> > >
> > > I've run Alexanders playground example and can confirm the issue
> > > with Chrome 50.0.2661.37 beta-m (64-bit), which is the newest
> > > beta release.
> > >
> > > I'm currently not using any svg images. Maybe someone wo is using
> > > svg could please identify where the deprecated call el.offset is
> > > happening?
> > >
> > > Regards
> > > Dietrich
> > >
> > > Am 21.03.2016 um 09:58 schrieb Alexander Kirsanov:
> > > > Hi Tobias. 
> > > > I created the issue about this behavior two weeks ago. 
> > > > You could use the example from this issue http://bugs.qooxdoo.o
> > > > rg/show_bug.cgi?id=9255
> > > >
> > >  
> >  
> > -----------------------------------------------------------------
> > -------------
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140___
> > ____________________________________________
> > qooxdoo-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> -------------------------------------------------------------------
> -----------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Matt Davis - NOAA Federal
Chrome was throwing this notice in event/handler/Keyboard.js in the __getEventTarget method (qx Desktop):

    /**
     * Get the target element for key events
     *
     * @return {Element} the event target element
     */
    __getEventTarget : function()
    {
      var focusHandler = this.__manager.getHandler(qx.event.handler.Focus);
      var target = focusHandler.getActive();

      // Fallback to focused element when active is null or invisible
      if (!target || target.offsetWidth == 0) {
        target = focusHandler.getFocus();
      }

      // Fallback to body when focused is null or invisible
      if (!target || target.offsetWidth == 0) {
        target = this.__manager.getWindow().document.body;
      }

      return target;
    },

On Mon, Mar 21, 2016 at 6:46 AM, Cajus Pollmeier <[hidden email]> wrote:
It would be better to use the qooxdoo SVG contribution instead of
injecting SVGs manually. We've an application that makes heavy use of
SVG and even if you modify this one (i.e. use the proposed bounding box
object), you will run into various other locations in the code where
you've to distinguish between SVG and non SVG elements.

Am Montag, den 21.03.2016, 14:38 +0300 schrieb Alexander Kirsanov:
> I found the issue in the qx.bom.element.Location. 
> The issue happens in the method get, the qooxdoo gets the
> elem.offsetWidth and elem.offsetHeight, but elem could be an instance
> of the SVGElement. So, I suppose that the qx should check is it
> svgelement or not and using the element.getBBox().width instead of
> elem.offsetWidth in case of SVG. But I’m not sure that it is good
> solution. 
>
>  
> > On Mar 21, 2016, at 2:28 PM, Dietrich Streifert <dietrich.streifert
> > @googlemail.com> wrote:
> >
> > And here is the corresponding issue for jQuery:
> >
> > https://github.com/jquery/jquery/issues/2895
> >
> >
> >
> > Am 21.03.2016 um 11:41 schrieb Dietrich Streifert:
> > > Hi All,
> > >
> > > I've run Alexanders playground example and can confirm the issue
> > > with Chrome 50.0.2661.37 beta-m (64-bit), which is the newest
> > > beta release.
> > >
> > > I'm currently not using any svg images. Maybe someone wo is using
> > > svg could please identify where the deprecated call el.offset is
> > > happening?
> > >
> > > Regards
> > > Dietrich
> > >
> > > Am 21.03.2016 um 09:58 schrieb Alexander Kirsanov:
> > > > Hi Tobias. 
> > > > I created the issue about this behavior two weeks ago. 
> > > > You could use the example from this issue http://bugs.qooxdoo.o
> > > > rg/show_bug.cgi?id=9255
> > > >
> > >  
> >  
> > -----------------------------------------------------------------
> > -------------
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140___
> > ____________________________________________
> > qooxdoo-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> -------------------------------------------------------------------
> -----------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



--
IRIS/iNWS Technical Lead
Decision Support Branch
Meteorological Development Lab
Office of Science and Technology Integration
National Weather Service, La Crosse, WI
(608) 406-0537


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Dietrich Streifert
In reply to this post by lqip32
In https://www.chromestatus.com/features/5724912467574784 chromium is recommending to use getBoundingClientRect() as a replacement.

But as Cajus said: I'll hesitate to run through qx.bom.element.<Dimension|Location|Scroll> and insert everywhere switches like

    ( elem instanceof SVGElement ) ? elem.getBoundingClientRect().width : elem.offsetWidth;
or
    ( elem instanceof SVGElement ) ? elem.getBoundingClientRect().height: elem.offsetHeight;

or similar.

Am 21.03.2016 um 12:38 schrieb Alexander Kirsanov:
I found the issue in the qx.bom.element.Location. 
The issue happens in the method get, the qooxdoo gets the elem.offsetWidth and elem.offsetHeight, but elem could be an instance of the SVGElement. So, I suppose that the qx should check is it svgelement or not and using the element.getBBox().width instead of elem.offsetWidth in case of SVG. But I’m not sure that it is good solution. 

 


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Cajus Pollmeier
In reply to this post by Matt Davis - NOAA Federal
You can have these errors in various places. And if you think you got them all, you'll find one in the dnd manager ;-) qx isn't makde for inline SVGs in the moment, but I'd really vote for making the code more robust for that. Focus handling with inline SVGs is another problem with SVG and IE.

Am Montag, den 21.03.2016, 06:56 -0500 schrieb Matt Davis - NOAA Federal:
Chrome was throwing this notice in event/handler/Keyboard.js in the __getEventTarget method (qx Desktop):

    /**
     * Get the target element for key events
     *
     * @return {Element} the event target element
     */
    __getEventTarget : function()
    {
      var focusHandler = this.__manager.getHandler(qx.event.handler.Focus);
      var target = focusHandler.getActive();

      // Fallback to focused element when active is null or invisible
      if (!target || target.offsetWidth == 0) {
        target = focusHandler.getFocus();
      }

      // Fallback to body when focused is null or invisible
      if (!target || target.offsetWidth == 0) {
        target = this.__manager.getWindow().document.body;
      }

      return target;
    },

On Mon, Mar 21, 2016 at 6:46 AM, Cajus Pollmeier <[hidden email]> wrote:
It would be better to use the qooxdoo SVG contribution instead of
injecting SVGs manually. We've an application that makes heavy use of
SVG and even if you modify this one (i.e. use the proposed bounding box
object), you will run into various other locations in the code where
you've to distinguish between SVG and non SVG elements.

Am Montag, den 21.03.2016, 14:38 +0300 schrieb Alexander Kirsanov:
> I found the issue in the qx.bom.element.Location. 
> The issue happens in the method get, the qooxdoo gets the
> elem.offsetWidth and elem.offsetHeight, but elem could be an instance
> of the SVGElement. So, I suppose that the qx should check is it
> svgelement or not and using the element.getBBox().width instead of
> elem.offsetWidth in case of SVG. But I’m not sure that it is good
> solution. 
>
>  
> > On Mar 21, 2016, at 2:28 PM, Dietrich Streifert <dietrich.streifert
> > @googlemail.com> wrote:
> >
> > And here is the corresponding issue for jQuery:
> >
> > https://github.com/jquery/jquery/issues/2895
> >
> >
> >
> > Am 21.03.2016 um 11:41 schrieb Dietrich Streifert:
> > > Hi All,
> > >
> > > I've run Alexanders playground example and can confirm the issue
> > > with Chrome 50.0.2661.37 beta-m (64-bit), which is the newest
> > > beta release.
> > >
> > > I'm currently not using any svg images. Maybe someone wo is using
> > > svg could please identify where the deprecated call el.offset is
> > > happening?
> > >
> > > Regards
> > > Dietrich
> > >
> > > Am 21.03.2016 um 09:58 schrieb Alexander Kirsanov:
> > > > Hi Tobias. 
> > > > I created the issue about this behavior two weeks ago. 
> > > > You could use the example from this issue http://bugs.qooxdoo.o
> > > > rg/show_bug.cgi?id=9255
> > > >
> > >  
> >  
> > -----------------------------------------------------------------
> > -------------
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140___
> > ____________________________________________
> > qooxdoo-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> -------------------------------------------------------------------
> -----------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




--
IRIS/iNWS Technical Lead
Decision Support Branch
Meteorological Development Lab
Office of Science and Technology Integration
National Weather Service, La Crosse, WI
(608) 406-0537

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Dietrich Streifert
In reply to this post by lqip32
here is just a quick fix proposal for qx.bom.eloement.Location

https://github.com/level420/qooxdoo/commit/7bdea45f23389804ddd663a7e032158f248b8466

This fixes the NaN value problem for right and bottom of Alexanders playground example in my local playground:

http://tinyurl.com/h89s2pk

@Alexander, @Matt: give it a try by replacing qx.bom.element.Location from my fork.

@all others: please have a look at that fix

Successful tested on Firefox 45, IE 11, Chrome 50, Chrome 49


Am 21.03.2016 um 12:38 schrieb Alexander Kirsanov:
I found the issue in the qx.bom.element.Location. 
The issue happens in the method get, the qooxdoo gets the elem.offsetWidth and elem.offsetHeight, but elem could be an instance of the SVGElement. So, I suppose that the qx should check is it svgelement or not and using the element.getBBox().width instead of elem.offsetWidth in case of SVG. But I’m not sure that it is good solution. 




------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Dietrich Streifert
As I understood the deprecation of SVGElement.offset* will break existing applications out there, because they currently use SVGElements in their apps.

There are a lot more locations where we would need to wrap offsetWidth and offsetHeight, e.g. target element calculations in the event handlers and element placement calculations and some basic things like the isSeeable method in qx.ui.core.Widget.

That means we would have to wrap all those .offsetWidth and .offsetHeight calls via something like qx.bom.Element.getOffsetWidth, qx.bom.Element.getOffsetHeight calls.


Am 21.03.2016 um 14:17 schrieb Dietrich Streifert:
here is just a quick fix proposal for qx.bom.eloement.Location

https://github.com/level420/qooxdoo/commit/7bdea45f23389804ddd663a7e032158f248b8466

This fixes the NaN value problem for right and bottom of Alexanders playground example in my local playground:

http://tinyurl.com/h89s2pk

@Alexander, @Matt: give it a try by replacing qx.bom.element.Location from my fork.

@all others: please have a look at that fix

Successful tested on Firefox 45, IE 11, Chrome 50, Chrome 49


Am 21.03.2016 um 12:38 schrieb Alexander Kirsanov:
I found the issue in the qx.bom.element.Location. 
The issue happens in the method get, the qooxdoo gets the elem.offsetWidth and elem.offsetHeight, but elem could be an instance of the SVGElement. So, I suppose that the qx should check is it svgelement or not and using the element.getBBox().width instead of elem.offsetWidth in case of SVG. But I’m not sure that it is good solution. 





------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Dietrich Streifert
In reply to this post by Matt Davis - NOAA Federal
Hi Matt,

could you give us an insight on how you are using svg in your application, if possible with some code snippets or playground examples.

This may help finding workarounds or fixes.

Thank you!

Regards
Dietrich

Am 20.03.2016 um 13:54 schrieb Matt Davis - NOAA Federal:
Hi Qooxdoo dev team,

I've been getting this warning in Chrome:

'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details.

​ Will there be an update available to handle this? It seems to be in a core DOM function which determines if a target is visible.

Thanks,
Matt ​




------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Matt Davis - NOAA Federal
We are not using any svg in our application. I assumed because of the warning it meant the qx framework was using it, as it comes back to the keyboard event handler and appears to be getting the offsetWidth of a widget...

Thanks,
Matt

On Mon, Mar 21, 2016 at 11:14 AM, Dietrich Streifert <[hidden email]> wrote:
Hi Matt,

could you give us an insight on how you are using svg in your application, if possible with some code snippets or playground examples.

This may help finding workarounds or fixes.

Thank you!

Regards
Dietrich


Am 20.03.2016 um 13:54 schrieb Matt Davis - NOAA Federal:
Hi Qooxdoo dev team,

I've been getting this warning in Chrome:

'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details.

​ Will there be an update available to handle this? It seems to be in a core DOM function which determines if a target is visible.

Thanks,
Matt ​




------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




--
IRIS/iNWS Technical Lead
Decision Support Branch
Meteorological Development Lab
Office of Science and Technology Integration
National Weather Service, La Crosse, WI
(608) 406-0537


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

oetiker
Hi Matt,

Today Matt Davis - NOAA Federal wrote:

> We are not using any svg in our application. I assumed because of the
> warning it meant the qx framework was using it, as it comes back to the
> keyboard event handler and appears to be getting the offsetWidth of a
> widget...

qooxdoo is not using svg internally afaik. have you tried creating
a playgrouynd example for your case ?

cheers
tobi

> Thanks,
> Matt
>
> On Mon, Mar 21, 2016 at 11:14 AM, Dietrich Streifert <
> [hidden email]> wrote:
>
> > Hi Matt,
> >
> > could you give us an insight on how you are using svg in your application,
> > if possible with some code snippets or playground examples.
> >
> > This may help finding workarounds or fixes.
> >
> > Thank you!
> >
> > Regards
> > Dietrich
> >
> > Am 20.03.2016 um 13:54 schrieb Matt Davis - NOAA Federal:
> >
> > Hi Qooxdoo dev team,
> >
> > I've been getting this warning in Chrome:
> >
> > 'SVGElement.offsetWidth' is deprecated and will be removed in M50, around
> > April 2016. See https://www.chromestatus.com/features/5724912467574784
> > for more details.
> >
> > ​ Will there be an update available to handle this? It seems to be in a
> > core DOM function which determines if a target is visible.
> >
> > Thanks,
> > Matt ​
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch [hidden email] +41 62 775 9902

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Matt Davis - NOAA Federal
I have not. Since this warning is being emitted in the qx core, it may be possible that Chrome is greedily grepping for offsetWidth and simply emitting it. I'll pull beta Chrome tomorrow and test our GUI.

Thanks,
Matt

On Mon, Mar 21, 2016 at 1:02 PM, Tobias Oetiker <[hidden email]> wrote:
Hi Matt,

Today Matt Davis - NOAA Federal wrote:

> We are not using any svg in our application. I assumed because of the
> warning it meant the qx framework was using it, as it comes back to the
> keyboard event handler and appears to be getting the offsetWidth of a
> widget...

qooxdoo is not using svg internally afaik. have you tried creating
a playgrouynd example for your case ?

cheers
tobi

> Thanks,
> Matt
>
> On Mon, Mar 21, 2016 at 11:14 AM, Dietrich Streifert <
> [hidden email]> wrote:
>
> > Hi Matt,
> >
> > could you give us an insight on how you are using svg in your application,
> > if possible with some code snippets or playground examples.
> >
> > This may help finding workarounds or fixes.
> >
> > Thank you!
> >
> > Regards
> > Dietrich
> >
> > Am 20.03.2016 um 13:54 schrieb Matt Davis - NOAA Federal:
> >
> > Hi Qooxdoo dev team,
> >
> > I've been getting this warning in Chrome:
> >
> > 'SVGElement.offsetWidth' is deprecated and will be removed in M50, around
> > April 2016. See https://www.chromestatus.com/features/5724912467574784
> > for more details.
> >
> > ​ Will there be an update available to handle this? It seems to be in a
> > core DOM function which determines if a target is visible.
> >
> > Thanks,
> > Matt ​
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch [hidden email] +41 62 775 9902

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




--
IRIS/iNWS Technical Lead
Decision Support Branch
Meteorological Development Lab
Office of Science and Technology Integration
National Weather Service, La Crosse, WI
(608) 406-0537


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade for offsetWidth?

Dietrich Streifert
In reply to this post by Matt Davis - NOAA Federal
Hi all,

I've created a github issue:

https://github.com/qooxdoo/qooxdoo/issues/195

Please add your comments and suggestions there if appropriate.

Regards
Dietrich


Am 20.03.2016 um 13:54 schrieb Matt Davis - NOAA Federal:
Hi Qooxdoo dev team,

I've been getting this warning in Chrome:

'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details.

​ Will there be an update available to handle this? It seems to be in a core DOM function which determines if a target is visible.

Thanks,
Matt ​

--
IRIS/iNWS Technical Lead
Decision Support Branch
Meteorological Development Lab
Office of Science and Technology Integration
National Weather Service, La Crosse, WI
(608) 406-0537




------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel