codex-team / codex-team/editor.js

CSS `inline-block` in Firefox causes empty hyperlinks

Open
#2,687 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

If there is a style that sets links to `inline-block`, then when creating links using EditorJS, the link data becomes empty.

That is, if this exists:

```
a {
display: inline-block;
}
```

Then links are not created properly, they are just `text` without href.

Steps to reproduce:
1. In Firefox, go to this JSFiddle which has a reproducible example: https://jsfiddle.net/oax3esyv/2/
2. Click on the "link me" text and make it a hyperlink.
3. Check the output or the console, and notice that the data becomes `"text": "Link me.
"`

Expected behavior:

Output should be `"text": "Link me.
"`

Screenshots:
![image](https://github.com/codex-team/editor.js/assets/746276/1c0ce39e-3fb2-4768-8ac9-d55e23431368)
![image](https://github.com/codex-team/editor.js/assets/746276/b4bb8d50-72fc-424a-970d-f902732d4032)

Device, Browser, OS: Ubuntu 22.04 or Windows 11, Firefox (124.0.2)

Editor.js version: 2.29.1

Plugins you use with their versions: None.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.