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

[FIX] web_editor: click enter in a banner inside a list in chrome #162204

Open
wants to merge 2 commits into
base: saas-16.4
Choose a base branch
from

Conversation

Mtaylorr
Copy link
Contributor

@Mtaylorr Mtaylorr commented Apr 17, 2024

Issue:

Clicking enter in a banner inside a list breaks the layout in chrome browser.

Steps to reproduce the issue:

  • Open chrome browser
  • Go to to-do
  • Create a list and add 1 item
  • Click enter (Second element of the list) and add a banner in the item
  • Click enter
  • Doesn't work as expected

Origin of the issue:

This is a browser issue, chrome in this specific case doesn't work properly, all the events until textInput are called when clicking enter but the last event is never triggerged which is the input event. The specific case can be reproduced with this:

<div contenteditable="true">
     <ul>
         <div contenteditable="false">
             <div contenteditable="true">
                 <p>
                     text[]
                 </p>
             </div>
         </div>
     </ul
</div>

Solution:

We manually trigger the input event in this specific case.

Issue:

List inside a banner under a list doesn't align correctly

steps to reproduce the issue:

  • Go to do
  • Add a list and first item
  • Add a banner
  • Add a list inside the banner
  • It's not correctly centered

Origin of the issue:

Since the list inside the banner is considered nested list under the top
list, the margin-bottom is removed.

Solution:

Reassign the style again when we are inside the banner.

task-3857296

Issue:
======
Clicking enter in a banner inside a list breaks the layout in chrome
browser.

Steps to reproduce the issue:
=============================
- Open chrome browser
- Go to to-do
- Create a list  and add 1 item
- Click enter (Second element of the list) and add a banner in the item
- Click enter
- Doesn't work as expected

Origin of the issue:
====================
This is a browser issue, chrome in this specific case doesn't work
properly, all the events until `textInput` are called when clicking
`enter` but the last event is never triggerged which is the `input`
event. The specific case can be reproduced with this:
```
<div contenteditable="true">
     <ul>
         <div contenteditable="false">
             <div contenteditable="true">
                 <p>
                     text[]
                 </p>
             </div>
         </div>
     </ul
</div>
```

Solution:
==========
We manually trigger the `input` event in this specific case.

task-3857296
@robodoo
Copy link
Contributor

robodoo commented Apr 17, 2024

Pull request status dashboard.

@C3POdoo C3POdoo added the RD research & development, internal work label Apr 17, 2024
@Mtaylorr Mtaylorr force-pushed the saas-16.4-task-3857296-macr branch 2 times, most recently from 5eb1d8f to 28de5ee Compare April 25, 2024 11:47
Issue:
======
List inside a banner under a list doesn't align correctly

steps to reproduce the issue:
=============================
- Go to do
- Add a list and first item
- Add a banner
- Add a list inside the banner
- It's not correctly centered

Origin of the issue:
====================
Since the list inside the banner is considered nested list under the top
list, the `margin-bottom` is removed.

Solution:
=========
Reassign the style again when we are inside the banner.

task-3857296
@Mtaylorr Mtaylorr force-pushed the saas-16.4-task-3857296-macr branch from 28de5ee to eb530af Compare April 25, 2024 11:53
@Mtaylorr Mtaylorr marked this pull request as ready for review June 5, 2024 09:38
@C3POdoo C3POdoo requested review from a team June 5, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants