frameworks/uki/src/uki-view/view/textField.js in uki-1.0.1 vs frameworks/uki/src/uki-view/view/textField.js in uki-1.0.2
- old
+ new
@@ -46,11 +46,11 @@
this._placeholder = v;
if (!this._multiline && nativePlaceholder(this._input)) {
this._input.placeholder = v;
} else {
if (!this._placeholderDom) {
- this._placeholderDom = uki.createElement('div', this.defaultCss + 'z-input:103;color:#999;cursor:text', v);
+ this._placeholderDom = uki.createElement('div', this.defaultCss + 'z-input:103;color:#999;cursor:text;-moz-user-select:none;', v);
this._dom.appendChild(this._placeholderDom);
this._updatePlaceholderVis();
uki.each(['fontSize', 'fontFamily', 'fontWeight'], function(i, name) {
this._placeholderDom.style[name] = this.style(name);
}, this);
@@ -81,20 +81,19 @@
this._createDom = function() {
var tagName = this._multiline ? 'textarea' : 'input';
this._dom = uki.createElement('div', Base.defaultCss + ';cursor:text;overflow:visible');
this._input = uki.createElement(tagName, this.defaultCss + (this._multiline ? '' : ';overflow:hidden;'));
- this._inputStyle = this._input.style;
this._input.value = this._value;
this._dom.appendChild(this._input);
this._input.value = this.value();
this._initFocusable(this._input);
this.bind('mousedown', function(e) {
+ if (e.target == this._input) return;
this.focus();
- e.preventDefault();
})
};
this._layoutDom = function(rect) {
Base._layoutDom.apply(this, arguments);
\ No newline at end of file