Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CanvasInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
self._hasFocus = false;
self._selection = [0, 0];
self._wasOver = false;
self._type = o.type || 'text';

// parse box shadow
self.boxShadow(self._boxShadow, true);
Expand Down Expand Up @@ -1098,6 +1099,11 @@
// clip the text so that it fits within the box
var text = self._clipText();

// hide password field properties
if (self._type === 'password' && text) {
text = text.split('').map(() => '*').join('')
}

// draw the selection
var paddingBorder = self._padding + self._borderWidth + self.shadowT;
if (self._selection[1] > 0) {
Expand Down
Loading