Re: GWT custom scrollIntoView() implementation

2016-01-29 Thread Vassilis Virvilis
Thanks Jens, Thomas for the insight and sorry for the late reply

So should I file a bug report? Or it is somehow taken care and it won't be
forgotten?

Jens:
I didn't try older versions of chrome (only 47, 48). As I said it works in
my simple pages but it fails in a complicated page that is outside my
control. Making a minimized version out of it that has the same behavior is
not a fun task...

 Vassilis

On Wed, Jan 27, 2016 at 9:19 AM, Thomas Broyer  wrote:

> The custom implementation was probably for Safari 3:
> https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#Browser_compatibility
> It's no longer supported in GWT so we could switch to the native
> implementation nowadays.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Vassilis Virvilis

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT custom scrollIntoView() implementation

2016-01-29 Thread Thomas Broyer


On Friday, January 29, 2016 at 11:47:44 PM UTC+1, Vassilis Virvilis wrote:
>
> Thanks Jens, Thomas for the insight and sorry for the late reply
>
> So should I file a bug report? Or it is somehow taken care and it won't be 
> forgotten?
>

It's actually already tracked 
at https://github.com/gwtproject/gwt/issues/8307 (note my comment there, 2½ 
years ago)

Looks like a good way to start contributing to GWT ;-)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT custom scrollIntoView() implementation

2016-01-26 Thread Thomas Broyer
The custom implementation was probably for Safari 3: 
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#Browser_compatibility
It's no longer supported in GWT so we could switch to the native implementation 
nowadays.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT custom scrollIntoView() implementation

2016-01-26 Thread Vassilis Virvilis
Hi,

I was using scrollIntoView() when I hit the bug.

In pages of mine GWT.scrollIntoView() is working in all major browsers.

In a foreign page GWTscrollIntoView() fails (does nothing) in chrome. It
however works in IE and firefox.

Looking at the implementation I found a custom implementation of
scrollIntoView.

I was expecting that GWT would call the native element.scrollIntoView().

I changed my code to call the native scrollIntoView() via JSNI and it works
in both pages in all browsers.

So does anybody know why GWT 2.7 has a custom scrollIntoView()
implementation?


-- 
Vassilis Virvilis

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT custom scrollIntoView() implementation

2016-01-26 Thread Juan Pablo Gardella
Hi Virviis,

Could you file a bug and the fix? It will be great to include in gwt 2.8.0

Thanks

On Tue, 26 Jan 2016 at 14:25 Vassilis Virvilis  wrote:

> Hi,
>
> I was using scrollIntoView() when I hit the bug.
>
> In pages of mine GWT.scrollIntoView() is working in all major browsers.
>
> In a foreign page GWTscrollIntoView() fails (does nothing) in chrome. It
> however works in IE and firefox.
>
> Looking at the implementation I found a custom implementation of
> scrollIntoView.
>
> I was expecting that GWT would call the native element.scrollIntoView().
>
> I changed my code to call the native scrollIntoView() via JSNI and it
> works in both pages in all browsers.
>
> So does anybody know why GWT 2.7 has a custom scrollIntoView()
> implementation?
>
>
> --
> Vassilis Virvilis
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT custom scrollIntoView() implementation

2016-01-26 Thread Vassilis Virvilis
Hi Juan,

AFAIK GWT 2.8 will have jsinterop and elemental so the native
scrollIntoView() will be used automatically.

I don't have a problem to file a bug report in GWT but I thought I should
ask first here about the reasoning of the current status.

Submitting a patch looks considerably more scary but I can try if there is
a consensus that this is indeed a bug and not a desired behavior.


On Tue, Jan 26, 2016 at 10:45 PM, Juan Pablo Gardella <
gardellajuanpa...@gmail.com> wrote:

> Hi Virviis,
>
> Could you file a bug and the fix? It will be great to include in gwt 2.8.0
>
> Thanks
>
> On Tue, 26 Jan 2016 at 14:25 Vassilis Virvilis  wrote:
>
>> Hi,
>>
>> I was using scrollIntoView() when I hit the bug.
>>
>> In pages of mine GWT.scrollIntoView() is working in all major browsers.
>>
>> In a foreign page GWTscrollIntoView() fails (does nothing) in chrome. It
>> however works in IE and firefox.
>>
>> Looking at the implementation I found a custom implementation of
>> scrollIntoView.
>>
>> I was expecting that GWT would call the native element.scrollIntoView().
>>
>> I changed my code to call the native scrollIntoView() via JSNI and it
>> works in both pages in all browsers.
>>
>> So does anybody know why GWT 2.7 has a custom scrollIntoView()
>> implementation?
>>
>>
>> --
>> Vassilis Virvilis
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-web-toolkit+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Vassilis Virvilis

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT custom scrollIntoView() implementation

2016-01-26 Thread Jens


> AFAIK GWT 2.8 will have jsinterop and elemental so the native 
> scrollIntoView() will be used automatically.
>

Only if you use Elemental of course ;)


I don't have a problem to file a bug report in GWT but I thought I should 
> ask first here about the reasoning of the current status.
>

Maybe the native scrollIntoView was not supported in all browsers back in 
the days in 2008 when that code was written. Or the behavior was flaky in 
most browsers. But its kind of strange if the current implementation does 
not work in Chrome and Google did not noticed it. GWT has a test case for 
it and I would assume that at least Google runs all tests in real browsers 
every now and then and not just in HtmlUnit (the test is disabled for 
HtmlUnit). So I think the issue should have been spotted. 

https://gwt.googlesource.com/gwt/+/master/user/test/com/google/gwt/dom/client/ElementTest.java#529

Have you tried other Chrome versions? Chrome tends to be super smart about 
avoiding browser reflows so maybe all the element information wasn't 
calculated yet correctly at the time scrollIntoView() was called and thus 
the implementation did not work. Have you tried wrapping scrollIntoView() 
with a deferred command just to see if it then starts to work?

Anyways if the test case continues to work when using the native method and 
the native method works equally well in browsers including IE8+ then I am 
pretty sure the custom implementation can be swapped with the native 
implementation nowadays. 

-- J.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.