Skip to content

IE: Link placement is off by some characters #1227

Open
@spiderpug

Description

@spiderpug

After selecting a word and clicking the anchor button, I insert a link. The resulting link appears 1 to n characters later, not where my selection was.

I found out that this depends on the underlying markup. If the paragraphs within the contenteditable div are not indented the issue appears. The issue gets worse depending on the markup level, e.g. if you have additional tags like table, tr, td, p the link is placed even more characters later.

If the paragraphs are indented for readability it does not appear - at least I could not reproduce it. The JSFiddle also show cases the working version.

Steps to reproduce (IE 11.0.9600.17420)

  • open this JSFiddle OR use exactly this markup:
<div class="editable">
<p>First paragraph</p>
<p>Some <strong>heavy</strong> lifting is required.</p>
</div>

Expected behavior:

Link should cover the word "heavy".

Actual behavior:

Link covers "eavy l"

Link to an example: JSFiddle

Versions

  • medium-editor: 5.22.0 (JSFiddle uses "latest")
  • browser: IE 11.0.9600.17420
  • OS: Win7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions