Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editor: prevent rerender on focus loss #398

Closed
wants to merge 2 commits into from

Conversation

max-moser
Copy link
Contributor

@max-moser max-moser commented Aug 6, 2024

Basically the same as inveniosoftware/react-invenio-forms#249, but ported to text inputs in requests.
Closes #399

@max-moser max-moser requested a review from Samk13 August 6, 2024 16:16
@max-moser
Copy link
Contributor Author

max-moser commented Aug 6, 2024

I just linked this PR to a new issue and tested the commit (cherry-picked on top of v4.1.1 for my local v12), and the issue with the "action + comment" editor is still happening.
I think it is indeed linked to the onChange handler, as that's pretty much the only spot where the string "Add comment (optional)" is defined, other than translations.

@Samk13
Copy link
Member

Samk13 commented Aug 6, 2024

I just linked this PR to a new issue and tested the commit (cherry-picked on top of v4.1.1 for my local v12), and the issue with the "action + comment" editor is still happening. I think it is indeed linked to the onChange handler, as that's pretty much the only spot where the string "Add comment (optional)" is defined, other than translations.

It shouldn't work if you only cherry-pick it. You need to watch the assets invenio-cli assets watch during testing to see the changes as when you build it will not take your local changes into account unless you release a new version.

Update:
I can reproduce it now, the fix is on its way!

Samk13 added a commit to Samk13/invenio-requests that referenced this pull request Aug 6, 2024
max-moser pushed a commit to max-moser/invenio-requests that referenced this pull request Aug 6, 2024
@max-moser max-moser closed this in a02062c Aug 6, 2024
max-moser pushed a commit that referenced this pull request Aug 6, 2024
@max-moser max-moser deleted the mm/richtext-input branch August 6, 2024 20:29
yashlamba added a commit to yashlamba/zenodo-rdm that referenced this pull request Aug 12, 2024
📁 invenio-app-rdm (13.0.0b0.dev11 -> 13.0.0b0.dev12 )

    📦 release: v13.0.0b0.dev12
    records-ui: fix missing field config search link generation
    i18n:push translations
    Editor: Update RichEditor to use inputValue
    bug: remove en-US as defined locale
    ui: add comma separator to community req total

📁 invenio-drafts-resources (5.0.0 -> 5.1.0 🌈)

    release: v5.1.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598

📁 invenio-requests (4.6.0 -> 4.7.0 🌈)

    release: v4.7.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598
    CI: Switch To Centralised Workflows
    comments: fix comment editor loses content on focus change

    * closes inveniosoftware/invenio-requests#398

📁 invenio-users-resources (5.3.1 -> 5.4.0 🌈)

    release: v5.4.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598

📁 invenio-vocabularies (4.3.0 -> 4.4.0 🌈)

    release: v4.4.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598
yashlamba added a commit to yashlamba/zenodo-rdm that referenced this pull request Aug 12, 2024
📁 invenio-app-rdm (13.0.0b0.dev11 -> 13.0.0b0.dev12 )

    📦 release: v13.0.0b0.dev12
    records-ui: fix missing field config search link generation
    i18n:push translations
    Editor: Update RichEditor to use inputValue
    bug: remove en-US as defined locale
    ui: add comma separator to community req total

📁 invenio-drafts-resources (5.0.0 -> 5.1.0 🌈)

    release: v5.1.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598

📁 invenio-requests (4.6.0 -> 4.7.0 🌈)

    release: v4.7.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598
    CI: Switch To Centralised Workflows
    comments: fix comment editor loses content on focus change

    * closes inveniosoftware/invenio-requests#398

📁 invenio-users-resources (5.3.1 -> 5.4.0 🌈)

    release: v5.4.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598

📁 invenio-vocabularies (4.3.0 -> 4.4.0 🌈)

    release: v4.4.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598
yashlamba added a commit to zenodo/zenodo-rdm that referenced this pull request Aug 12, 2024
📁 invenio-app-rdm (13.0.0b0.dev11 -> 13.0.0b0.dev12 )

    📦 release: v13.0.0b0.dev12
    records-ui: fix missing field config search link generation
    i18n:push translations
    Editor: Update RichEditor to use inputValue
    bug: remove en-US as defined locale
    ui: add comma separator to community req total

📁 invenio-drafts-resources (5.0.0 -> 5.1.0 🌈)

    release: v5.1.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598

📁 invenio-requests (4.6.0 -> 4.7.0 🌈)

    release: v4.7.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598
    CI: Switch To Centralised Workflows
    comments: fix comment editor loses content on focus change

    * closes inveniosoftware/invenio-requests#398

📁 invenio-users-resources (5.3.1 -> 5.4.0 🌈)

    release: v5.4.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598

📁 invenio-vocabularies (4.3.0 -> 4.4.0 🌈)

    release: v4.4.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598
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.

Comment editor loses content
2 participants