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

remove check in closestElement #3128

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

ged-odoo
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Apr 22, 2024

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

@@ -632,7 +632,7 @@ export class ListPlugin extends Plugin {
return;
}
// Detect if cursor is at beginning of LI.
if (closestElement(startContainer, "LI") !== closestLIendContainer) {
if (!startContainer || closestElement(startContainer, "LI") !== closestLIendContainer) {

Choose a reason for hiding this comment

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

What is the use case ? (test name ?)

Copy link
Author

Choose a reason for hiding this comment

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

"@html_editor/list/delete_backward/selection collapsed/ordered/basic/should convert to paragraph"

Choose a reason for hiding this comment

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

We should receive a range but startContainer is null. It look strange

Copy link
Author

Choose a reason for hiding this comment

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

it's when there is no valid previous cursor position. so deletebackward should basically remove the list

@ged-odoo ged-odoo force-pushed the master-phoenix-ged branch 2 times, most recently from a1370c4 to 6980b36 Compare April 22, 2024 13:11
@FrancoisGe FrancoisGe merged commit e2fc483 into master-phoenix Apr 22, 2024
@FrancoisGe FrancoisGe deleted the master-phoenix-ged branch April 22, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants