Prevent Mouse Focus jumping into Oxygen Editor

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Posts: 1
Joined: Wed Jan 04, 2023 5:27 pm

Prevent Mouse Focus jumping into Oxygen Editor

Post by duy_Nguyen12 »

Hello everyone !

We want to update text-content of elements in Oxygen from our own View.

Code: Select all

    private void insertNewTextContent(AuthorElement authorElement, AuthorDocumentController documentController,
            String content) {
        try {
            documentController.delete(authorElement.getStartOffset() + 1, authorElement.getEndOffset());
            documentController.insertXMLFragment(content, authorElement.getStartOffset() + 1);

        } catch (AuthorOperationException e) {
The problem is that, when we use insert-methods (insertXMLFragment, insertFragment, insertMultipleFragments, insertText..), the mouse focus always jumps into the Oxygen-Editor where the content was inserted.

But what we need is, that the mouse-focus stays in our own view.
Is there any way to prevent the mouse-focus from jumping into Oxygen Editor ?

EDIT: Edited mouse-cursor to mouse focus

Best Regards and happy new year,