Skip to content

Haven sometimes locks when requesting a keypress #2

@shardworkx-ui

Description

@shardworkx-ui

story.txt

Sometimes, "wait for any key;" causes Vorple to hang.

Problem is in haven / input.js / keypress.send

    if( scrolltop + window.innerHeight < document.body.clientHeight - ( promptHidden ? 0 : 40 ) ) {

For some reason, even though it is at the bottom, scrolltop is not an integer, and the left hand sum is about 0.8 less than the RHS. scrollOrFocus doesn't do anything, and it stops at the early return.

Possible fixes:

  • add one to LHS
  • call Math.ceil on LHS
  • don't early return if the difference on that comparison was very close.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions