Skip to content

Commit

Permalink
Fixing draw bug in input, adding type property for these types of con…
Browse files Browse the repository at this point in the history
…trols to distinguish between them better.
  • Loading branch information
davebalmer committed Oct 8, 2010
1 parent 812975d commit 33b44ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions js/ui/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ joInput = function(data) {
};
joInput.extend(joControl, {
tagName: "input",
type: "text",

setData: function(data) {
if (data !== this.data) {
Expand Down Expand Up @@ -102,6 +103,13 @@ joInput.extend(joControl, {
return false;
},

draw: function() {
if (this.container.value)
this.value = this.data;
else
this.innerHTML = this.value;
},

onMouseDown: function(e) {
joEvent.stop(e);
this.focus();
Expand Down
3 changes: 2 additions & 1 deletion js/ui/passwordinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ joPasswordInput = function(data) {
joInput.apply(this, arguments);
};
joPasswordInput.extend(joInput, {
className: "password"
className: "password",
type: "password"
});

0 comments on commit 33b44ce

Please sign in to comment.