언어 설정

Menu
Sites
Language
ListView auto scroll

Hi everyone!

When I add some line in my listview, the view, automatically scroll down to the last element. This behavior happens if the rows added are not too many (ex. 10).

This behavior can also be noted in the sample project Winset:

  • In tips-> list-sample -> list-sample.js line #34: replace the 3 with 11.
  • Run application -> choose "Example for using listview" -> "reset and create".

How can I fix this? Is that a bug?

$("#new").on( "vclick", function ( e ) {
	var i;

//	$("#mylist").html("").trigger("create");

	for ( i = 0; i < 10; i++ ) {
		add_item();
	}
	$("#mylist").listview("refresh");
});
Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 댓글
Lakshmi Grandhi
Hii, In the code for reset and create you find the line $("#mylist").html("").trigger("create"); , which means it clears the listview and appends new list items so the focus would be at the last list item , but if you remove that line then you'll not face this problem .
Luca Garbolino
Hi, thanks for your helps. I tried to comment out that line, but the problem remains. The first time you load the lines in the list, it scroll. How can I keep focus on the first line?
Marco Buettner
Show you code
Lakshmi Grandhi
This can be solved using scrollTop(); but there is already a bug raised for it .