Workaround for Keyboard hiding Input Panel when replying to the Forum

You know what I’m talking about, the keyboard hides the reply/new topic box which is annoying.

References:

To fix:

create the directory ${HOME}/.local/share/org.sailfishos/browser/.mozilla/chrome

In there, create a file called userContent.css

put the following in there (this is the basic version, see other alternatives below):

@-moz-document domain("forum.sailfishos.org") {

  #reply-control.open {
    height: 750px !important;
  }

}

Close the browser, restart and use the forum.

Notes:

  1. use a value about 3/4 of your screen height. 750 works for me on Xperia10, but see below for alternatives.
  2. This “breaks” landscape mode, as there the window will be too high. Someone with more experience in CSS might have a suggestion about this. fixed, see answers below.
  3. if you’re on a release lower than SFOS 4.x, the path is not .local/share/org.sailfishos/browser/.mozilla/chrome but rather ~/.mozilla/mozembed/chrome
12 Likes

Maybe it could be possible to replace 750px by 75%

Just tried with 75% on XA2plus. Works fine in portrait mode. 80% is better with landscape mode.

Finally, I propose this:
@-moz-document domain(“forum.sailfishos.org”) {
@media (orientation: portrait) {
#reply-control.open {
height: 75% !important;
}
}
@media (orientation: landscape) {
#reply-control.open {
height: 90% !important;
}
}
}

4 Likes

Perfect! Thanks.

I’m reluctant to do relative vs absolute values in CSS but this is a hack anyway so…

Rather than enlarging the size of the reply frame, I think it’s better to put it higher on screen so:
@-moz-document domain(‘forum.sailfishos.org’) {
@media (orientation: portrait) {
#reply-control.open {
top: 30%;
}
}
@media (orientation: landscape) {
#reply-control.open {
top: 10%;
}
}
}

4 Likes

Nice. That is the better solution, but it looks a bit weird when closing the keyboard :slight_smile:

Careful with copy pasting this, it contains typographic quotes around the domain, and adds an automatic markdown link. They need to be dumb quotes, and no link like this:

@-moz-document domain("forum.sailfishos.org") {
  @media (orientation: portrait) {
    #reply-control.open {
      top: 30%;
    }
  }
  @media (orientation: landscape) {
    #reply-control.open {
      top: 10%;
    }
  }
}

Better format these by indenting with four spaces.

2 Likes

I have used Maemo and Meego in the past, so I am no newbie to alternative OSes. But the fact that this is still a problem with the stock browser on the OS’s own official forum…is pretty sad.

Adding this to make this here future-proof.

From the FF Release Notes:

  • Starting with 69, Firefox no longer loads userChrome.css or userContent.css by default . Users who wish to customize Firefox by using these files can set the toolkit.legacyUserProfileCustomizations.stylesheets preference to true to restore this ability.
1 Like

This issue seems to be resolved in 4.2.

4 Likes