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

fix: 💄 Remove Input.Password value attribute from dom #20544

Merged
merged 3 commits into from Dec 31, 2019

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Dec 30, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

close #20541
close #7761
close #19959
close #20536
close #12672
close #10952
close #14592

💡 Background and solution

Hack for value attruibute for <input type="password" />.

image

ref: facebook/react#11896

📝 Changelog

Language Changelog
🇺🇸 English Remove Input.Password value attribute from dom.
🇨🇳 Chinese 优化 Input.Password 在 dom 中明文显示 value 属性的问题。

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@afc163 afc163 requested a review from zombieJ Dec 30, 2019
@auto-add-label auto-add-label bot added the bug label Dec 30, 2019
Copy link

@tests-checker tests-checker bot left a comment

Could you please add tests to make sure this change works as expected?

@netlify
Copy link

netlify bot commented Dec 30, 2019

Deploy preview for ant-design ready!

Built with commit 5cb6068

https://deploy-preview-20544--ant-design.netlify.com

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 30, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5cb6068:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Dec 30, 2019

Codecov Report

Merging #20544 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20544      +/-   ##
==========================================
+ Coverage   97.81%   97.81%   +<.01%     
==========================================
  Files         286      286              
  Lines        7735     7747      +12     
  Branches     2177     2182       +5     
==========================================
+ Hits         7566     7578      +12     
  Misses        169      169
Impacted Files Coverage Δ
components/input/Input.tsx 100% <100%> (ø) ⬆️
components/input/Password.tsx 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bcb71b8...5cb6068. Read the comment docs.

@zombieJ
Copy link
Member

zombieJ commented Dec 31, 2019

如果用户用原生 form,会不会提交一直是空的?

@afc163
Copy link
Member Author

afc163 commented Dec 31, 2019

我试试

@afc163
Copy link
Member Author

afc163 commented Dec 31, 2019

image

image

image

没问题。

@afc163
Copy link
Member Author

afc163 commented Dec 31, 2019

想起来可以用 codesandbox ci 来测:https://codesandbox.io/s/antd-reproduction-template-d5uct

@zombieJ
Copy link
Member

zombieJ commented Dec 31, 2019

<Input.Password defaultValue="2333" /> 这个还会暴露。

@afc163 afc163 merged commit 2adf8ce into master Dec 31, 2019
36 checks passed
@afc163 afc163 deleted the fix-input-password-value branch Dec 31, 2019
afc163 added a commit that referenced this issue Jan 3, 2020
* 💄 Improve Step `type="navigation"` UI in small screen (#20545)

close #19877

* fix: use Object.prototype.toString to check object (#20546)

close #20528

* Fix image misplacing (#20552)

Switched the images of "The keyword of the user query is only displayed in three categories, Topics, Questions and Articles." and "The number of categories the keyword of the user query belongs to is uncertain."

* fix: 💄 Remove Input.Password value attribute from dom (#20544)

* 💄 Remove Input.Password value attribute in dom

close #20541
close #7761
close #19959
close #20536
close #12672
close #10952

*  fix test coverage

* 🐛 fix defaultValue create `value` attribute in Input.Password

* 🆙 upgrade stylelint-order (#20585)

* fix: url 404 (#20589)

* fix url 404

* update url

* Update colors.en-US.md (#20606)

* Revert "Update colors.en-US.md (#20606)" (#20607)

This reverts commit c513296.

* docs: update Modal docs (#20612)

* doc: update Modal docs

* doc: update modal en-US doc

Co-authored-by: DiamondYuan <541832074@qq.com>
Co-authored-by: Yaindrop <yuan_dian@live.com>
Co-authored-by: jiang <155259966@qq.com>
Co-authored-by: myeunhyuk <39618466+myeunhyuk@users.noreply.github.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
Co-authored-by: vagusX <vagusX@users.noreply.github.com>
@zombieJ zombieJ mentioned this pull request Jan 3, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment