Browse Source

Merging in latest from upstream (VISUAL/fineui:refs/heads/master)

* commit 'e36382d5c82485a375a5f3684bda2c031cd0947e':
  bugfix
es6
windy 3 years ago
parent
commit
948f2d4d68
  1. 13
      src/base/single/editor/editor.textarea.js
  2. 2
      src/less/base/single/editor/editor.textarea.less

13
src/base/single/editor/editor.textarea.js

@ -86,7 +86,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (BI.isNotEmptyString(o.watermark)) {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
type: "bi.label",
cls: "bi-water-mark cursor-default textarea-watermark",
textAlign: "left",
whiteSpace: "normal",
@ -96,8 +96,15 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
hgap: 4,
vgap: 4
});
this.watermark.on(BI.TextButton.EVENT_CHANGE, function () {
self.focus();
this.watermark.element.bind({
mousedown: function (e) {
if (self.isEnabled()) {
self.editor.focus();
} else {
self.editor.blur();
}
e.stopEvent();
}
});
BI.createWidget({
type: "bi.absolute",

2
src/less/base/single/editor/editor.textarea.less

@ -24,4 +24,4 @@
}
}
}
}
}

Loading…
Cancel
Save