frontail icon indicating copy to clipboard operation
frontail copied to clipboard

Auto-scrolling doesn't work

Open Bagunda opened this issue 5 years ago • 22 comments

Auto-scrolling doesn't work https://www.youtube.com/watch?v=iqamAAtSTu0

Bagunda avatar Feb 05 '19 11:02 Bagunda

Facing the same issue. Autoscroll doesnt work and everytime I have to scroll down manually to see the latest logs

ravening avatar Aug 23 '19 14:08 ravening

@Bagunda @rakgenius which browser do you use?

mthenw avatar Aug 23 '19 21:08 mthenw

I am encountering the same issue with the latest chrome (76.0.3809.100). I might also add, that I am using frontail with openhabian

andrelung avatar Aug 24 '19 01:08 andrelung

@mthenw Im using chrome browser Version 76.0.3809.100 (Official Build) (64-bit)

ravening avatar Aug 24 '19 08:08 ravening

@Bagunda @rakgenius which browser do you use? Chrome. It doesn't work about 1.5 years

Bagunda avatar Aug 24 '19 13:08 Bagunda

Can you paste me the exact command that you are running (or openhabian is running)?

mthenw avatar Aug 24 '19 19:08 mthenw

@Bagunda I cannot see that on your video but what happens when the window is scrolled to the bottom and you refresh the page? Does it go back to top?

mthenw avatar Aug 24 '19 19:08 mthenw

@Bagunda @andrelung @rakgenius can I ask you to validate the fix from https://github.com/mthenw/frontail/pull/180?

mthenw avatar Aug 24 '19 20:08 mthenw

Openhabian is using the npm-based installation. Line 30 you can see how it is installed: https://github.com/openhab/openhabian/blob/master/functions/nodejs-apps.bash And here is the exact command (/service): https://github.com/openhab/openhabian/blob/master/includes/frontail.service

I'll try uninstalling the npm version and installing your fix later today.

andrelung avatar Aug 25 '19 07:08 andrelung

Can you paste me the exact command that you are running (or openhabian is running)?

frontail -d -n 100 --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/default.json /var/log/openhab2/openhab.log /var/log/openhab2/events.log or frontail -d -n 1000 --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/default.json /var/log/openhab2/openhab.log /var/log/openhab2/events.log

Bagunda avatar Aug 25 '19 10:08 Bagunda

@Bagunda I cannot see that on your video but what happens when the window is scrolled to the bottom and you refresh the page? Does it go back to top?

Here is new video https://www.youtube.com/watch?v=2Y6H5Qb7IGs

Bagunda avatar Aug 25 '19 10:08 Bagunda

@Bagunda @andrelung @rakgenius can I ask you to validate the fix from #180?

Today I try fix #180. At the end of the video https://www.youtube.com/watch?v=2Y6H5Qb7IGs Autoscroll doesn't work.

Bagunda avatar Aug 25 '19 10:08 Bagunda

I merged the PR and release new version (4.7.0) as it fixes @andrelung issue.

@Bagunda could you scroll your window to the bottom and run the following command in the dev tools?

console.log(window.innerHeight, window.scrollY, document.body.offsetHeight)

mthenw avatar Aug 26 '19 18:08 mthenw

console.log(window.innerHeight, window.scrollY, document.body.offsetHeight)

https://youtu.be/iKUkM_MkApc 2019-08-27_19-13-36

Bagunda avatar Aug 27 '19 16:08 Bagunda

OK, looks like I know the culprit. Basically, your view is zoomed in. That's why the measurements are different than usual. Let me try to fix it.

mthenw avatar Aug 27 '19 18:08 mthenw

Basically, your view is zoomed in.

In the settings of windows 10, I zoomed thescale. Are you talking about this?

Bagunda avatar Sep 25 '19 18:09 Bagunda

@Bagunda yeah, that's probably it.

mthenw avatar Sep 28 '19 20:09 mthenw

Openhabian 2.4 (stable) Frontail 4.8.0 Raspb. 3 B Chrome and Edge

no Auto-Scroll for me :( Using "Simple-Autoscroll" Extension for Chrome in the meanwhile.

riotm0de avatar Dec 10 '19 01:12 riotm0de

Same problem on a zoomed scale. On normal scale it works as it should...

radokristof avatar Jan 18 '20 11:01 radokristof

This is browser issue . works good in firefox or edge browser

sujitrp avatar Apr 08 '20 05:04 sujitrp

This is not a browser issue. If you check scrollY you get a float. This float is to small and you be stay all the time under body height value. What i recommand a math round in line 305 at app.js:

from

var wasScrolledBottom = window.innerHeight + window.scrollY >= document.body.offsetHeight;

to this:

var wasScrolledBottom = window.innerHeight + Math.round(window.scrollY) >= document.body.offsetHeight;

Maybe a button for auto scroll is a bit better.

I have this issue in all modern Browser like Edge, Chrom, Opera and Firefox.

NPM is version 4.9.1 with this bug.

Wikibear avatar Jul 27 '20 16:07 Wikibear

No auto-scroll on Firefox (v94.0) on Linux...

Only change in Firefox is making fonts bigger - would that affect auto-scroll?

ak2766 avatar Nov 21 '21 02:11 ak2766