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

Selection and deleting bug in IE #1185

Open
Nikcrysis opened this issue Apr 28, 2017 · 3 comments
Open

Selection and deleting bug in IE #1185

Nikcrysis opened this issue Apr 28, 2017 · 3 comments
Labels

Comments

@Nikcrysis
Copy link

Draft-js 0.10.0
Internet Explorer 11

Sometimes when you try to select all text with mouse and delete with backspace it.. nothing happens.

@marekolszewski
Copy link

I don't think this is IE specific. This happens for me on draftjs.org in Chrome, Safari, and Firefox on my Mac as well. It usually works once then stops working.

@stephenburgess8
Copy link

I have been dealing with this issue for several days. From what I can tell, the new selection is not triggering a selection event in DraftJS. Oddly, for a new text input instance, the selection seems to work fine. Then, after losing focus on returning to edit the text again, selecting the text fails to trigger the selection event.

The function I am passing as the onChange prop is not being triggered by selecting text in IE11 only. Since this is happening, it seems to keep track of the old selection area and applies the change there. Typically this will be the first or last place in the text.

However my team is using DraftJS in a few different places with slightly different props and different CSS wrappers. The case where we're experiencing this is when the text is wrapped in container elements that use flex. We thought it may have something do with that but I have been unable to determine if that's the crucial difference. In the other way we are using DraftJS, we don't have this problem.

I would appreciate help on this as it has been frustrating me for several days. Thank you.

@stephenburgess8
Copy link

One further bit of clarification:

The first time after creating an draftjs editor on my page, I'm able to select and change styles appropriately. However if I lose focus in the editor and return to it, it's at that point that I'm unable to make any selection.

@mrkev mrkev added the ie label Oct 3, 2020
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

4 participants