Skip to content

Safari 9.1.x Not Performing ENTER Correctly #1119

@mikebronner

Description

@mikebronner

Description

SHIFT- ENTER doesn't work as expected after pressing ENTER when in Safari.

Steps to reproduce

  1. Open in Safari.
  2. Type text in editable field.
  3. Hit SHIFT-ENTER in your text. (Do not hit ENTER just yet.)
  4. Observe that SHIFT-ENTER is working as expected.
  5. Hit ENTER.
  6. Observe that the cursor does not advance correctly.
  7. Continue typing.
  8. Hit SHIFT-ENTER and observe broken behavior.

Expected behavior:
SHIFT-ENTER adds a soft-return, moving the cursor to the next line.
ENTER starts a new paragraph, moving the cursor to the start of the new paragraph.

Actual behavior:

I am experiencing this as well in Safari 9.1.1 and 9.1.2. The behavior of SHIFT-ENTER vs ENTER is flawed (works fine in Chrome). If you start off pressing SHIFT-ENTER everything will be fine until you hit ENTER. That will add

<br>
<p><br></p>
<br>

directly after the spot you hit enter, and it won't push the cursor to the end, but just before the opening <p> tag. If you start typing or hit SHIFT-ENTER everything is hopelessly messed up.

However, if you don't type, but move the cursor to then end, SHIFT-ENTER will continue behaving as normal -- until you hit ENTER again. Rinse and repeat.

Hopefully this helps somewhat in troubleshooting the issue and maybe coming up with a script that attempts to fix Safari's ill behavior. :)

I think the code that is inserted is correct, but the problem appears that the cursor is not being advanced correctly.

Versions

  • medium-editor: 5.20.0
  • browser: Safari 9.1.1 and 9.1.2
  • OS: Max OS X.11.5

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