Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
True Scrolling Bug IE7 and IE8
11/11/2009
14:27
Avatar
Kaleb
Guest
Guests

The true scrolling is an awesome concept and works great in Firefox and Chrome, however I did notice a bug in IE7 and IE8. To reproduce issue.

Browse here http://www.trirand.com/jqgrid/.....ml in IE7 or IE8.

Open the true scrolling demo.

Scroll down the list very slowly until you get close to the hundredth row. Right when you go path the Hundredth row it will throw an error about an invalid argument which is a negative height. In my case it was trying to set a height to -575px and IE was throwing an error. I also noticed that when this happened the grid did not load the next page but it reloaded the first page. Maybe this is where the issue stems from?

If you scroll down the list real fast it works fine it is only when you go past that last row slowly.

Once again thanks for the great product!

Kaleb

11/11/2009
16:01
Avatar
Kaleb
Guest
Guests

After doing some debugging it looks to be a problem with IE not reporting the current page correctly. I changed the line as follows and it seems to work.

I replaced the parseInt with the Math.Round function and it rounds up to the next whole number instead of going down a whole number like the parseInt function does.(ex. if number is .99 the parseInt function will make it 0)

Starting at Line 272 in the "grid.base.js" file.

if (ttop <= 0 && tbot < dh && parseInt((tbot + scrollTop + div - 1) / div) < p.lastpage) {
npage = parseInt((dh - tbot + div - 1) / div);
if (tbot >= 0 || npage < 2 || p.scroll === true) {
page = Math.round((tbot + scrollTop) / div) + 1;
ttop = -1;
} else {
ttop = 1;
}
}

11/11/2009
18:43
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

I'll take a look at this... but unless IE is reporting the positions incorrectly, Math.round is the wrong function. It /has/ to truncate to get the correct result.

Mark

11/11/2009
19:02
Avatar
Kaleb
Guest
Guests

markw65 said:

I'll take a look at this… but unless IE is reporting the positions incorrectly, Math.round is the wrong function. It /has/ to truncate to get the correct result.

Mark


Cool thanks Mark!

12/11/2009
10:06
Avatar
Kaleb
Guest
Guests

More Info...

It does look like IE is not reporting the positions correctly. If I add one to the function below it works in IE fine.

                    if (ttop <= 0 && tbot < dh && parseInt((tbot + scrollTop + div - 1) / div) < p.lastpage) {

                        npage = parseInt((dh - tbot + div - 1) / div);

                        if (tbot >= 0 || npage < 2 || p.scroll === true) {

                            page = parseInt((tbot + scrollTop + 1) / div) + 1;

                            ttop = -1;

                        } else {

                            ttop = 1;

                        }

                    }

12/11/2009
11:08
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

Sorry, but I cant actually reproduce the problem.

I've tried single clicking the scroll arrow all the way down to row 100, and Ive tried paging down until Im close, and /then/ single clicking... what exactly do you mean by scrolling "slowly" down to row 100?

Mark

13/11/2009
04:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Mark,

Here is another similar IMHO:

http://www.trirand.com/blog/?p.....ed/#p11646

I will take a look at the problem these days.

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

13/11/2009
09:24
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

Hi Tony,

Thanks. Im going to be away for the w/e so wont be able to look at it until Monday.

One more thought... Math.round may be the answer after all.

The current formula is supposed to take a pixel value, and return the page that contains that pixel. For that, Math.round would be wrong (if you were in the lower half of the page, it would give the /next/ page).

But in this case, if all the calculations are correct, the pixel should always be the /first/ pixel on the page. But Im guessing (from Kaleb's investigation) that something isnt quite adding up, and we're getting an off by 1 (or perhaps off by border, or margin, or padding width, or some such) error. So Math.round ought to give the correct result.

Somehow doesnt feel right, because its just hiding the fact that the calculation isnt quite correct... but I think it /should/ work, as long as the error is less than half a page :-\\

For the cells with images case... if the rows aren't all exactly the same height (?), the scrolling rows feature just isnt going to work as it stands (it depends on being able to translate back and forth between pixel offsets and row numbers /without/ having looked at all the preceding rows). I think it may be possible to fix that, but would require changing the scrolling logic somewhat...

Mark

27/11/2009
12:00
Avatar
Akeru
Member
Members
Forum Posts: 13
Member Since:
17/06/2009
sp_UserOfflineSmall Offline

Hi ! Thanks for investigating. The post here : http://www.trirand.com/blog/?p.....sed/#p1179 might be clearer regarding this issue, but my rows indeed don't (or might not) have the same height...

04/12/2009
08:51
Avatar
Akeru
Member
Members
Forum Posts: 13
Member Since:
17/06/2009
sp_UserOfflineSmall Offline

Any news on this ?

04/12/2009
08:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I have one request to you.

Could you please prepare live example and send me a link. You can send me PM or e-mail me to tony at trirand dot com.

Thanks

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

05/12/2009
13:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Could you please check the last from GitHub. I have make some chenges to this.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
81 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information