Skip to content

fix: shortcuts while editing text item#1370

Open
letsfindaway wants to merge 1 commit intoOpenBoard-org:devfrom
letsfindaway:fix-text-item-edit-shortcuts
Open

fix: shortcuts while editing text item#1370
letsfindaway wants to merge 1 commit intoOpenBoard-org:devfrom
letsfindaway:fix-text-item-edit-shortcuts

Conversation

@letsfindaway
Copy link
Copy Markdown
Collaborator

  • While editing a text item, secondary shortcuts like Shift+Ins have not been processed properly
  • Instead they have been routed to the board controller
  • Add UBApplication::enableEditingShortcuts to enable/disable global action shortcuts for cut/copy/paste
  • Disable these shortcuts while a text item is selected
  • Reorder and cleanup includes in UBGraphicsTextItemDelegate

Fixes #1367

@letsfindaway
Copy link
Copy Markdown
Collaborator Author

I reverted this PR back to "Draft" because I now think that it is better to coordinate the editing shortcuts with the focus state of the text item instead of the selection state. Only one text item can have the focus, but multiple might be selected. So I will change this.

My intended target behavior is as follows:

  • If a text item has focus, then disable global editing shortcuts, so that they go to the item.
  • If no text item has focus, then enable global editing shortcuts, so that they go to the UBBoardController.
  • In the UBBoardController remove the check whether a text item is selected. When pasting text, we just have two cases:
    • The text is a URL starting with http: or https:, then start creating a web widget.
    • In all other cases create a new text item.

Note that the latter should happen independent of the selection state of a web widget. The selection state shall never influence paste handling, only the focus state will. For the user, the focus state is indicated by the fact, that there is a text cursor within the text.

@letsfindaway letsfindaway force-pushed the fix-text-item-edit-shortcuts branch from ad5665b to e5bfe4b Compare November 3, 2025 10:35
@letsfindaway letsfindaway marked this pull request as ready for review November 3, 2025 10:36
@letsfindaway
Copy link
Copy Markdown
Collaborator Author

ready for review with the above mentioned behavior implemented.

- while editing a text item, secondary shortcuts like
  Shift+Ins have not been processed properly
- instead they have been routed to the board controller
- add UBApplication::enableEditingShortcuts to enable/disable
  global action shortcuts for cut/copy/paste
- disable these shortcuts while a text item has focus
- add missing override annotations in UBGraphicsTextItem.h

Signed-off-by: letsfindaway <me@letsfindaway.de>
@letsfindaway letsfindaway force-pushed the fix-text-item-edit-shortcuts branch from e5bfe4b to 69ee19d Compare February 11, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Pasting text with shift-insert into an existing textbox clears all previous text

1 participant