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

[WIP] optimize: input and textarea #695

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Conversation

ChrisCindy
Copy link
Contributor

@ChrisCindy ChrisCindy commented Dec 8, 2024

  • fix: maxlength attribute not work
<input maxlength="5" />
  • fix: maxLength property not work
const input = document.createElement('input');
input.maxLength = 5;
  • feat: support keyup and keydown event
const input = document.createElement('input');
input.addEventListener('keyup', function (e) {
  console.log(e.code);
  console.log(e.key);
});
  • fix: vertical align is not centered for placeholder and text in input
  • feat: support selectionStart and selectionEnd
const input = document.querySelector('input')
input.value = '12345';
input.selectionStart = 1;
input.selectionEnd = 3;
input.focus();
  • feat: hide counter when set maxlength
  • fix: set disabled attribute is invalid
<input disabled />
  • feat: support enterkeyhint and inputmode

  • feat: update get keyboard type

  • refactor: make checkbox and radio default style more dense

  <div>
    <input type="checkbox" id="horns" name="horns" />
    <label for="horns">Horns</label>
  </div>
  • refactor: finish radio and checkbox element and its property/attribute management

drugsloveyou and others added 27 commits March 26, 2024 13:45
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.

3 participants