Skip to content

Cursors should hide when textbox is not focused #1619

@archbirdplus

Description

@archbirdplus

Currently textboxes open with no cursor. After clicking or otherwise entering the textbox, a cursor is displayed. So far is correct behavior.

Proposal:

Clicking out of the textbox, or hitting escape, or any other action to focus away from the textbox should remove the cursor. Currently, the cursor cannot be removed, even when there are multiple active textboxes. If you cannot input text, there should not be a cursor.

This would be in line with standard OS textboxes (nuances aside), and would show the user whether they are currently able to type into a textbox.

Debate:

Up for debate is what should happen to selections when the user clicks away from them. I argue that we should remove both the cursor and the selection for simplicity.

For reference, MacOS allows separate windows to maintain their own independent cursors and selections. Browsers support a separate cursor/selection in the search bar from the displayed webpage. Focusing in the search bar will hide a webpage's cursor but not a selection. There is also some nuanced behavior that happens when clicking back into a webpage's textbox. We should absolutely not try to emulate this in Cubyz. We would only cause more confusion and waste more effort this way. We should limit Cubyz to keeping track of a single cursor within the entire application. Cubyz menu-windows are not fully featured the way that separate applications' windows are.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions