weird arrow key scrolling in Pale Moon and SeaMonkey Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
BZZZZ
Moongazer
Moongazer
Posts: 10
Joined: 2021-04-29, 10:49
Contact:

weird arrow key scrolling in Pale Moon and SeaMonkey

Unread post by BZZZZ » 2021-08-03, 06:34

  1. Save this to HTML file:

    Code: Select all

    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="UTF-8"/>
      <title>full screen canvas test</title>
      <style type="text/css">
        div{
          position:absolute;
          top:0;
          left:0;
          bottom:0;
          right:0;
        }
        html,body,div,canvas{
          margin:0;
          padding:0;
        }
        body{
          overflow:hidden;
        }
      </style>
    </head>
    <body>
      <div>
        <canvas></canvas>
      </div>
      <script type="text/javascript">
        var canv=document.getElementsByTagName("canvas")[0];
        var context=canv.getContext("2d");
        window.onresize=function(){
          canv.width=window.innerWidth;
          canv.height=window.innerHeight;
          context.fillStyle="rgb("+100*Math.random()+"%,"+100*Math.random()+"%,"+100*Math.random()+"%)";
          context.fillRect(0,0,canv.width,canv.height);
        };
        window.onresize();
      </script>
    </body>
    </html>
  2. Open HTML file with Pale Moon or SeaMonkey.
  3. Press down arrow key on keyboard.
  4. Look at bottom of the page (there is white space).
Scrolling doesn't happen in new Firefox, Chromium, Epiphany.
Scrolling happens in Pale Moon, SeaMonkey.

Discovered while playing Woomy-Arras.io.

vannilla
Board Warrior
Board Warrior
Posts: 1770
Joined: 2018-05-05, 13:29

Re: weird arrow key scrolling in Pale Moon and SeaMonkey

Unread post by vannilla » 2021-08-03, 07:11

Seems the correct behaviour to me. What's the issue?

User avatar
BZZZZ
Moongazer
Moongazer
Posts: 10
Joined: 2021-04-29, 10:49
Contact:

Re: weird arrow key scrolling in Pale Moon and SeaMonkey

Unread post by BZZZZ » 2021-08-03, 08:41

vannilla wrote:
2021-08-03, 07:11
Seems the correct behaviour to me. What's the issue?
Behaviour might be incorrent because it's not scrolling in most browsers.

Also why is there empty space at the bottom (everything has no margin and no padding)?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 30824
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: weird arrow key scrolling in Pale Moon and SeaMonkey

Unread post by Moonchild » 2021-08-03, 09:59

You're not constraining the html size and sizing the canvas by window metrics, not content metrics, so our behaviour is correct. As far as I can tell it's undefined behaviour, so other browsers are also not incorrect if they do it differently.
For this kind of intent you probably want position:fixed and not position:absolute, anyway. But I digress.
"Just because you know something is going to break in the end, doesn't mean that it can't have an effect that lasts into the future. Joy. Wonder. Laughter. Hope. The world can be better because of what you built in the past." -- Tom Scott
Image

Post Reply