Skip to content

Firefox removes p tag after select all and delete #956

Open
@anem

Description

@anem

If you have several paragraphs of text and you select all, then delete, when you start typing again the first line is no longer contained in a p tag. When you resume typing, the first line is unwrapped and the next is correctly wrapped in a paragraph.

This only seems to be an issue in firefox 44.0 (Works as expected on Chrome 48.0, not yet tested in IE).

Attached a screenshot showing the result (snippet from FireBug HTML view).

settings used:

var editor = new MediumEditor('.editable', {
    disableDoubleReturn: true,
    disableExtraSpaces: true,
    spellcheck: true,
    placeholder: { text:"Please type your entry here" },
    paste: {
        cleanPastedHTML: true,
        cleanReplacements: [[/\s\s+/g, ' ']]
    },
    toolbar: {
        buttons: [
            'bold',
            'italic', 
            'underline',
        ]
    }
});

screen shot 2016-02-08 at 10 31 26

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