Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE replace text selection with keypress #3137

Merged
merged 1 commit into from Aug 1, 2016
Merged

IE replace text selection with keypress #3137

merged 1 commit into from Aug 1, 2016

Conversation

ghost
Copy link

@ghost ghost commented Aug 1, 2016

Why:

  • After creating a textbox, selecting text, and pressing a key, the first character of the previous text would remain.
  • This happened because the hidden textarea would not update its selection in IE when it was in the same parent element as the canvas.

This change addresses the need by:

  • Keeping the hidden textarea in the body element.
  • IE now correctly updates the text selection as the user interacts with the canvas textbox.

Behavior in IE 11 before this change:
0417548e-55a6-11e6-84a3-e427f30b78fe

Behaviour in IE 11 after this change:
1618c92e-55a6-11e6-94c4-a356685ceee3

closes #2451

Why:

* After creating a textbox, selecting text, and pressing a key, the first character of the previous text would remain.
* This happened because the hidden textarea would not update its selection in IE when it was in the same parent element as the canvas.

This change addresses the need by:

* Keeping the hidden textarea in the body element.
* IE now correctly updates the text selection as the user interacts with the canvas textbox.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IText/Textbox - The first character is ignored when you type after selecting all text
1 participant