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!
BZZZZ

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
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
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?

BZZZZ

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: 35402
Joined: 2011-08-28, 17:27
Location: Motala, 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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked