frontail
frontail copied to clipboard
Auto-scrolling doesn't work
Auto-scrolling doesn't work https://www.youtube.com/watch?v=iqamAAtSTu0
Facing the same issue. Autoscroll doesnt work and everytime I have to scroll down manually to see the latest logs
@Bagunda @rakgenius which browser do you use?
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
@mthenw Im using chrome browser Version 76.0.3809.100 (Official Build) (64-bit)
@Bagunda @rakgenius which browser do you use? Chrome. It doesn't work about 1.5 years
Can you paste me the exact command that you are running (or openhabian is running)?
@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?
@Bagunda @andrelung @rakgenius can I ask you to validate the fix from https://github.com/mthenw/frontail/pull/180?
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.
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 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 @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.
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)
console.log(window.innerHeight, window.scrollY, document.body.offsetHeight)
https://youtu.be/iKUkM_MkApc
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.
Basically, your view is zoomed in.
In the settings of windows 10, I zoomed thescale. Are you talking about this?
@Bagunda yeah, that's probably it.
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.
Same problem on a zoomed scale. On normal scale it works as it should...
This is browser issue . works good in firefox or edge browser
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.
No auto-scroll on Firefox (v94.0) on Linux...
Only change in Firefox is making fonts bigger - would that affect auto-scroll?