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

t.getStyle is not a function when dragging a list #12723

Open
dpapala opened this issue Oct 24, 2022 · 4 comments
Open

t.getStyle is not a function when dragging a list #12723

dpapala opened this issue Oct 24, 2022 · 4 comments
Labels
package:list squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@dpapala
Copy link

dpapala commented Oct 24, 2022

πŸ“ Provide detailed reproduction steps (if any)

  1. The ClassicEditor is loaded
  2. I drag and drop a list in the editor (see screenshot)
    image

❌ Actual result

The console error
image

This the function that is called
getAttributeOnUpcast( listParent ) { return listParent.getStyle( 'list-style-type' ) || DEFAULT_LIST_TYPE; }
in listpropertiesediting.js

This error comes periodically not every time that I drag and drop the same list.

πŸ“ƒ Other details

  • Browser: Firefox 105.0.3
  • OS: Windows 11
  • First affected CKEditor version: 5

If you'd like to see this fixed sooner, add a πŸ‘ reaction to this post.

@dpapala dpapala added the type:bug This issue reports a buggy (incorrect) behavior. label Oct 24, 2022
@mabryl
Copy link
Contributor

mabryl commented Oct 25, 2022

Hi dpapala,

Thanks for bringing this issue to our attention. I tried reproducing it on my end but wasn't able to do it. Could you provide us with more detailed steps on how to recreate the issue?

I know that you mentioned that the error appears irregularly but maybe you noticed some pattern when it occurs? Is it just this one particular list that is problematic? And if so, could you paste it in this conversation retaining its formatting?

And could you tell us what build of our editor you're using? Is it a custom version built from source or maybe it's one of our predefined builds?

@dpapala
Copy link
Author

dpapala commented Oct 26, 2022

@mabryl It is a custom build.
I try to drag a simple unordered list.
Herre is the html code:
<ul> <li><code>__USER__</code><font style="vertical-align: inherit;">The user's full name (including title) </font></li> <li><code>__ID__</code><font style="vertical-align: inherit;">Internal Die Event ID </font></li> <li><code>__CERTID__</code><font style="vertical-align: inherit;">The unique ID of the certificate </font></li> <li><code>__TITLE__</code><font style="vertical-align: inherit;">The title of the training event </font></li> <li><code>__DATE__</code><font style="vertical-align: inherit;">The day the certificate was issued </font></li> </ul>
Something that I noticed is that I get the current error only when the editor is empty of content.

@mabryl mabryl added package:list squad:core Issue to be handled by the Core team. labels Sep 22, 2023
@mabryl
Copy link
Contributor

mabryl commented Sep 22, 2023

Resurrecting this thread because thanks to a report from one of our customers I found a way to more consistently reproduce this issue.

Firstly, the listPropertiesEditing plugin has to be included. documentListPropertiesEditing does not produce this issue. Then, try setting this HTML as the editor's data - <li>test</li>.

It looks like the editor doesn't like the fact that the <li> is not wrapped in an <ul> or <ol>. When you include just the opening tag, e.g. like so - <ul><li>test</li> - the issue isn't reproducible.

Not exactly sure how it's related to the dragging issue that @dpapala initially reported but it's possible that somehow the <ul> or <ol> tags get dropped when dragging the list and this prompts the issue to appear.

@aldonace-wu aldonace-wu added the support:2 An issue reported by a commercially licensed client. label Sep 22, 2023
@Witoso
Copy link
Member

Witoso commented Sep 25, 2023

Thanks, @mabryl! Most likely, this issue won't be picked up, as we have #14632 in the pipeline that should finish soon. I highly recommend switching to the Document list, as this will be our main list implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

4 participants