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

[stable24] fix: update link menububble on editor updates #2874

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

backportbot-nextcloud[bot]
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Sep 8, 2022

backport of #2872

@mejo-
Copy link
Member

mejo- commented Sep 8, 2022

/compile

Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like stable24 does not have debounce yet.

max-nextcloud and others added 3 commits September 12, 2022 11:41
Ensure the menububble always shows the correct entries.

The menububble shows different buttons if the selected text is a link.
However its content often became out of sync with the editor:
* when new text was selected the bubble was still cached
* when the selection stayed active but was expanded / shrinked
  the menu bubble also stayed the same
* when someone else editing the same page changed the current selection into a link

Recompute the menububbles `active` data on every editor change.

The code used for this is mostly taken from the menu bars mechanism
for the same purpose.
See updateState in src/components/Menu/BaseActionEntry.js.

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: Jonas <jonas@freesources.org>
@mejo-
Copy link
Member

mejo- commented Sep 12, 2022

looks like stable24 does not have debounce yet.

Indeed. Installed now.

@mejo- mejo- dismissed max-nextcloud’s stale review September 12, 2022 11:14

debounce is installed now.

@mejo- mejo- merged commit 436f8ba into stable24 Sep 12, 2022
@delete-merged-branch delete-merged-branch bot deleted the backport/2872/stable24 branch September 12, 2022 11:15
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.

3 participants