You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ben Titmarsh <be...@hotmail.co.uk> on 2013/05/20 15:41:11 UTC

Annoying scroll when a zone is updated

Hi All,

I have a grid and a form inside a zone.  The grid can contain hundreds of rows and values can be updated with Ajax resulting in a zone refresh.  I have a bit of a UX problem in that when the user changes a value in the grid, the zone is refreshed and the browser scrolls back up to the top of the zone.  Clearly if you want to update lots of rows, losing the context of where you were in the grid is a real frustration.

Any suggestions on a solution for this?

Thanks,
Ben.


 		 	   		  

RE: Annoying scroll when a zone is updated

Posted by Ben Titmarsh <be...@hotmail.co.uk>.
A bit more detail on this, I've found that the reason for the scroll is because it is focussing on a form field (a select component) above the grid when the zone is updated.  I have quite a few form fields inside this zone, is there a way to turn off autofocus for all of them?

> From: ben.titmarsh@hotmail.co.uk
> To: users@tapestry.apache.org
> Subject: Annoying scroll when a zone is updated
> Date: Mon, 20 May 2013 13:41:11 +0000
> 
> Hi All,
> 
> I have a grid and a form inside a zone.  The grid can contain hundreds of rows and values can be updated with Ajax resulting in a zone refresh.  I have a bit of a UX problem in that when the user changes a value in the grid, the zone is refreshed and the browser scrolls back up to the top of the zone.  Clearly if you want to update lots of rows, losing the context of where you were in the grid is a real frustration.
> 
> Any suggestions on a solution for this?
> 
> Thanks,
> Ben.
> 
> 
>  		 	   		  
 		 	   		  

RE: Annoying scroll when a zone is updated

Posted by Ben Titmarsh <be...@hotmail.co.uk>.
Thanks for the replies, that was exactly what I needed!

> Date: Tue, 21 May 2013 07:14:12 +0000
> From: P.Hvass@albourne.com
> To: users@tapestry.apache.org
> Subject: Re: Annoying scroll when a zone is updated
> 
> Hi Ben, 
> 
> 
> Check http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Form.html autofocus parameter. 
> 
> 
> Thanks, 
> Peter 
> 
> ----- Original Message -----
> 
> From: "Peter Hvass" <P....@albourne.com> 
> To: "Tapestry users" <us...@tapestry.apache.org> 
> Sent: Monday, 20 May, 2013 5:56:47 PM 
> Subject: Re: Annoying scroll when a zone is updated 
> 
> Hi Ben, 
> 
> 
> Do you have any form fields in the zone? Those will steal focus (causing a 'jump' in scroll location) unless you specify autofocus="false" on the form. 
> 
> 
> Thanks, 
> Peter 
> 
> ----- Original Message ----- 
> 
> From: "Ben Titmarsh" <be...@hotmail.co.uk> 
> To: users@tapestry.apache.org 
> Sent: Monday, 20 May, 2013 4:41:11 PM 
> Subject: Annoying scroll when a zone is updated 
> 
> Hi All, 
> 
> I have a grid and a form inside a zone. The grid can contain hundreds of rows and values can be updated with Ajax resulting in a zone refresh. I have a bit of a UX problem in that when the user changes a value in the grid, the zone is refreshed and the browser scrolls back up to the top of the zone. Clearly if you want to update lots of rows, losing the context of where you were in the grid is a real frustration. 
> 
> Any suggestions on a solution for this? 
> 
> Thanks, 
> Ben. 
> 
> 
> 
> 
 		 	   		  

Re: Annoying scroll when a zone is updated

Posted by Peter Hvass <P....@albourne.com>.
Hi Ben, 


Check http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Form.html autofocus parameter. 


Thanks, 
Peter 

----- Original Message -----

From: "Peter Hvass" <P....@albourne.com> 
To: "Tapestry users" <us...@tapestry.apache.org> 
Sent: Monday, 20 May, 2013 5:56:47 PM 
Subject: Re: Annoying scroll when a zone is updated 

Hi Ben, 


Do you have any form fields in the zone? Those will steal focus (causing a 'jump' in scroll location) unless you specify autofocus="false" on the form. 


Thanks, 
Peter 

----- Original Message ----- 

From: "Ben Titmarsh" <be...@hotmail.co.uk> 
To: users@tapestry.apache.org 
Sent: Monday, 20 May, 2013 4:41:11 PM 
Subject: Annoying scroll when a zone is updated 

Hi All, 

I have a grid and a form inside a zone. The grid can contain hundreds of rows and values can be updated with Ajax resulting in a zone refresh. I have a bit of a UX problem in that when the user changes a value in the grid, the zone is refreshed and the browser scrolls back up to the top of the zone. Clearly if you want to update lots of rows, losing the context of where you were in the grid is a real frustration. 

Any suggestions on a solution for this? 

Thanks, 
Ben. 





Re: Annoying scroll when a zone is updated

Posted by Peter Hvass <P....@albourne.com>.
Hi Ben, 


Do you have any form fields in the zone? Those will steal focus (causing a 'jump' in scroll location) unless you specify autofocus="false" on the form. 


Thanks, 
Peter 

----- Original Message -----

From: "Ben Titmarsh" <be...@hotmail.co.uk> 
To: users@tapestry.apache.org 
Sent: Monday, 20 May, 2013 4:41:11 PM 
Subject: Annoying scroll when a zone is updated 

Hi All, 

I have a grid and a form inside a zone. The grid can contain hundreds of rows and values can be updated with Ajax resulting in a zone refresh. I have a bit of a UX problem in that when the user changes a value in the grid, the zone is refreshed and the browser scrolls back up to the top of the zone. Clearly if you want to update lots of rows, losing the context of where you were in the grid is a real frustration. 

Any suggestions on a solution for this? 

Thanks, 
Ben.