Fixed displaying of selection boxes, fixes #762

Tested in Chromium and Firefox.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #762
| License       | MIT
| Doc PR        | --