Skip to content

[FIX] html_editor: linkpopover not opening #4490

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

Draft
wants to merge 2 commits into
base: master-mysterious-egg
Choose a base branch
from

Conversation

visp-odoo
Copy link

The linkpopover is not opening because the o_editable and contentEditable=True are applied to a span element inside an a tag.

@robodoo
Copy link

robodoo commented Apr 25, 2025

This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged.

@@ -631,7 +631,7 @@ export class LinkPlugin extends Plugin {
}
} else {
const closestLinkElement = closestElement(selection.anchorNode, "A");
if (closestLinkElement && closestLinkElement.isContentEditable) {
if (closestLinkElement) {

Choose a reason for hiding this comment

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

@visp-odoo I don't think removing isContentEditable condition is right solution, in case of Navbar links we have to handle the case, this issue will occur on links where anchor have span some other editable element, so I guess we need should check whether closestAnchor have editable child then we should allow further.

Previously Navbar links were explicitly handled.

@visp-odoo visp-odoo force-pushed the master-mysterious-egg-navbar-linkpopover-visp branch 3 times, most recently from 74e111c to 25dccc6 Compare April 28, 2025 10:35
@ged-odoo ged-odoo force-pushed the master-mysterious-egg branch from e24556e to 897f4ab Compare April 29, 2025 18:30
@visp-odoo visp-odoo force-pushed the master-mysterious-egg-navbar-linkpopover-visp branch from 25dccc6 to 029f43c Compare April 30, 2025 07: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