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

Correctly render placeholder for textarea in IE11 #8020

Merged
merged 3 commits into from
Nov 5, 2016

Commits on Nov 3, 2016

  1. Check if textContent should be set for textarea

    shouldSetNodeTextContent returns whether a node.textContent should be
    updated. Currently it only covers one case, which is to avoid setting
    the textContent if the text is empty and a placeholder exists.
    Brandon Dail committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    9e99b8e View commit details
    Browse the repository at this point in the history
  2. Only set node.value if it's equal to initialValue

    In IE11 textContent is populated when the placeholder attribute is set.
    Without this check, we end up setting node.value equal to the
    placeholder text, causing the textarea to actually render with the text
    inside.
    
    This check makes sure that textContent is equal to our expected
    initialValue, which should be the case when using defaultValue.
    Brandon Dail committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    1462e43 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    561b8f2 View commit details
    Browse the repository at this point in the history