text_input box keeps losing focus

Hello! We are using a custom annotation recipe using a text input block that works just fine when running that recipe, but when I try to run prodigy review on the resulting labels the text input suddenly loses focus after every single character typed.

This is what I have in prodigy.json, which exactly matches the block defined in the custom recipe:

  "blocks": [
    {"view_id": "html"},
    {
        "field_id": "evidence_row",
        "view_id": "text_input",
        "field_rows": 10,
        "field_label": "...",
        "field_autofocus": true
    }
  ] 

Would appreciate any ideas on what might be going wrong. Thanks!

Is it possible for you to share the entire recipe? There might be a mishap in your Python file that I'd like to rule out and I can confirm if I'm able to run your recipe locally. If possible, it would also help to have an example of your annotation .jsonl file.

Sorry for the late response! This is the recipe and I attached a small example of the annotation data:

@prodigy.recipe(
    "annotate_evidence_rows",
    dataset=("Dataset to save answers to", "positional", None, str),
    source=("The source data as a JSONL file", "positional", None, str),
    view_id=("Annotation interface", "option", "v", str),
)
def annotate_evidence_rows(dataset: str, source: str, view_id: str = "text_input"):
    stream = JSONL(source)

    blocks = [
        {"view_id": "html"},
        {
            "field_id": "evidence_row",
            "view_id": "text_input",
            "field_rows": 10,
            "field_label": "...",
            "field_autofocus": True,
        },
    ]

    return {
        "view_id": "blocks",  # Annotation interface to use
        "dataset": dataset,  # Name of dataset to save annotations
        "stream": stream,  # Incoming stream of examples
        "config": {
            "blocks": blocks,
        },
        "validate_answer": validate_answer,
    }

evidence_rows_batch_2.jsonl (6.9 KB)

I just tried running it locally and it seems to run fine on my end.

CleanShot 2022-06-20 at 08.16.08

Just to check, does this error persist across browsers? Have you tried both Firefox and Chrome?