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

Check if pastebin can't be added always to body #5307

Open
Comandeer opened this issue Aug 10, 2022 · 1 comment
Open

Check if pastebin can't be added always to body #5307

Comandeer opened this issue Aug 10, 2022 · 1 comment
Labels
browser:firefox The issue can only be reproduced in the Firefox browser. plugin:clipboard The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:task Any other issue (refactoring, typo fix, etc).

Comments

@Comandeer
Copy link
Member

Type of report

Task

Provide description of the task

Currently, we have a logic that checks the browser and decides if the pastebin should be added to the body or directly to the html

editable.getAscendant( CKEDITOR.env.ie ? 'body' : 'html', 1 ).append( pastebin );

However, the logic adds the pastebin to the html element only in Firefox, in every other browser the pastebin is inserted into the body. We should investigate if we can remove that logic and always insert the pastebin into the body. Especially that editables outside of body are known to cause issues.

Connected issues:

Other details

  • Browser: Firefox
  • OS: N/A
  • CKEditor version: 4+
  • Installed CKEditor plugins: clipboard
@Comandeer Comandeer added type:task Any other issue (refactoring, typo fix, etc). status:confirmed An issue confirmed by the development team. browser:firefox The issue can only be reproduced in the Firefox browser. plugin:clipboard The plugin which probably causes the issue. labels Aug 10, 2022
@Comandeer
Copy link
Member Author

Connected: #1169.

From my quick tests, it seems that the pastebin is not used in the Firefox at all, so probably the whole logic can be simply replaced with:

editable.getAscendant( 'body', 1 ).append( pastebin ); 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:firefox The issue can only be reproduced in the Firefox browser. plugin:clipboard The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:task Any other issue (refactoring, typo fix, etc).
Projects
None yet
Development

No branches or pull requests

1 participant