facebookarchive/draft-js

Wrong behaviour of draft editor when quick typing (using cypress)

Open

#1 460 ouverte le 26 oct. 2017

Voir sur GitHub
 (5 commentaires) (4 réactions) (0 assignés)JavaScript (2 646 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (22 554 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

bug When typing text in a div with role='textbox', it's not going to be handled correctly. First letter goes to newly created block but rest of the text is going directly to the div.

current behavior video recording screenshot

steps to reproduce run in cypress (tool to run GUI tests)

describe('Draft tests', function(){

    it('Should type in one line', function(){
        cy.visit('https://draftjs.org')
            .get('.public-DraftEditor-content')
            .wait(1000)
            .type('Text in one line ')
            .wait(3000)
    })
})

expected behavior Text should be in one line and whole in one div.

version of Draft.js 0.10.3

browser / OS Chrome 62, macOS 10.12.6

Guide contributeur