Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Microsoft Edge - easily enters a confused state via ctrl-a + keypress #501

Open
butchmarshall opened this issue Jun 30, 2016 · 7 comments
Open
Labels

Comments

@butchmarshall
Copy link

butchmarshall commented Jun 30, 2016

It's pretty easy to replicate.

Go to https://facebook.github.io/draft-js
type "a"
hit enter
type ctrl-a to select everything
type "j"

You'll get a javascript error. The editor is then in a confused state.

Go back to the beginning of the document and hit enter again, you'll get broken behaviour of the cursor jumping to the bottom of the screen.

These are the javascript errors that are thrown.

image

image

See my attached gif.

edge_issue

Facebook.com does not seem to suffer from this bug - they must be using something greater than 0.7.0 internally?

@hellendag
Copy link

Hmm, the Draft version we're using in production is maybe slightly past 0.7, but not by much -- it's basically the same as master. Looks like it might be a React issue. Can you provide a stack trace? cc @spicyj @zpao

Does the same issue occur on all of the example editors, too? (Unfortunately I picked up a new MacBook a week or two ago and haven't reinstalled VMWare yet.)

@hellendag hellendag added the bug label Jul 4, 2016
@sophiebits
Copy link
Contributor

What version of React are you on? I'm not aware of anything we changed that might have affected this but it's possible.

@butchmarshall
Copy link
Author

Hello @spicyj - it's the editor at https://facebook.github.io/draft-js which is reporting 15.0.1

@butchmarshall
Copy link
Author

butchmarshall commented Jul 7, 2016

Hi @hellendag, yes the issue occurs in all example editors I've tried (it also occurs on the internal editor I'm developing).

I believe this has something to do with draft-js + Edge (doesn't happen in IE9-11) rather than React. The error only occurs when "ctrl-a" is specifically used to highlight the text. Other methods of highlighting all text do not cause this issue.

If, for example, you follow a different sequence to select all text, everything is fine.

type "a"
hit enter
hit "shift, arrow up" to select all text
type "j"

type "a"
hit enter
hit "shift, page-up" to select all text
type "j"

The editor does not crash in either of these scenarios.

I have been unsuccessfully so far in trying to get a stack-trace from Microsoft Edge, I have found the development tools in it rather frustrating...

@butchmarshall
Copy link
Author

butchmarshall commented Jul 13, 2016

Wow. I figured it out. So much tracing.

It's a bug in React. I filed a separate issue.

@butchmarshall
Copy link
Author

butchmarshall commented Jul 21, 2016

Fix has been sitting with react for about a week now. Any tips on getting it looked at?

@sophiebits
Copy link
Contributor

We're behind on PRs in React, sorry.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants