• Andrzej Michalec
    December 12, 2017 at 4:57 am #4842

    Dear SPARK team,
    I am unable to move focus programmaticaly to TextEditor widget in SPARK 4.5.2CF EE using its dedicated focus() function. For other input widgets calling focus() moves cursor inside target widget so that user can start typing immediatelly. For TextEditor focus in “lost” because it is moved to widget but not to its editable area.  Looking on implementation. TextEditor focus() calls “this._instance.text.focus()” while TinyMCE object reference is kept in “textEditorControl” property so that “this._instance.textEditorControl.focus()” should be called.

    Scenario to recreate:
    1. Create CSHS with coach having Text CV, Text Editor CV and Button CV next to each other.
    2. Set Text Editor CV identifier to “TextEditorID”
    3. Set Button CV “on click” handler to:   me.ui.getSibling(“TextEditorID”).focus()
    4. Run screen, click on Text CV, and then on Button CV to move focus — observe that focus is not moved, it is still in first Text input widget
    5. Modify Button CV “on click” handler to:   me.ui.getSibling(“TextEditorID”)._instance.textEditorControl.focus()
    6. Re-run screen, click on Text CV, and then on Button CV to move focus — now cursor blinks in Text Editor writable area, focus moved successfully.


    SPARK Support
    December 13, 2017 at 10:48 am #4846

    Hi Andy,

    I have been able to reproduce this issue and have opened a defect.  A fix will be released in an upcoming version.


    Stephen P.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search