Skip to content

Commit

Permalink
Rewrited TextBox
Browse files Browse the repository at this point in the history
And fixed some bugs in other module
  • Loading branch information
otakustay committed May 17, 2013
1 parent 88e2765 commit 4b64a40
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 293 deletions.
4 changes: 2 additions & 2 deletions src/InputControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,15 @@ define(
label = document.createElement('label');
label.id = helper.getId(this, 'validity');
if (lib.isInput(this.main)) {
label.for = this.main.id;
lib.setAttribute(label, 'for', this.main.id);
}
else {
var nestedInput =
this.main.getElementsByTagName('input')[0]
|| this.main.getElementsByTagName('textarea')[0]
|| this.main.getElementsByTagName('select')[0];
if (nestedInput && nestedInput.type !== 'hidden') {
label.for = nestedInput.id;
lib.setAttribute(label, 'for', nestedInput.id);
}
}
lib.insertAfter(label, this.main);
Expand Down
Loading

0 comments on commit 4b64a40

Please sign in to comment.