*/
_observeLoad: function() {
elBySelAll('pre', this._editor.$editor[0], (function(pre) {
- pre.addEventListener(WCF_CLICK_EVENT, this._callbackEdit);
+ pre.addEventListener('mousedown', this._callbackEdit);
this._setTitle(pre);
}).bind(this));
},
if (event.pageY > offset.top && event.pageY < (offset.top + _headerHeight)) {
event.preventDefault();
+ this._editor.selection.save();
this._pre = pre;
UiDialog.open(this);
return {
id: id,
options: {
+ onClose: (function () {
+ this._editor.selection.restore();
+ }).bind(this),
+
onSetup: (function() {
elById(idButtonSave).addEventListener(WCF_CLICK_EVENT, this._save.bind(this));
for (var i = 0, length = this._quotes.length; i < length; i++) {
quote = this._quotes[i];
- quote.addEventListener(WCF_CLICK_EVENT, this._callbackEdit);
+ quote.addEventListener('mousedown', this._callbackEdit);
this._setTitle(quote);
}
},
if (event.pageY > offset.top && event.pageY < (offset.top + _headerHeight)) {
event.preventDefault();
+ this._editor.selection.save();
this._quote = quote;
UiDialog.open(this);
return {
id: id,
options: {
+ onClose: (function () {
+ this._editor.selection.restore();
+ }).bind(this),
+
onSetup: (function() {
elById(idButtonSave).addEventListener(WCF_CLICK_EVENT, this._save.bind(this));
}).bind(this),
*/
_observeLoad: function() {
elBySelAll('woltlab-spoiler', this._editor.$editor[0], (function(spoiler) {
- spoiler.addEventListener(WCF_CLICK_EVENT, this._callbackEdit);
+ spoiler.addEventListener('mousedown', this._callbackEdit);
this._setTitle(spoiler);
}).bind(this));
},
if (event.pageY > offset.top && event.pageY < (offset.top + _headerHeight)) {
event.preventDefault();
+ this._editor.selection.save();
this._spoiler = spoiler;
UiDialog.open(this);
return {
id: id,
options: {
+ onClose: (function () {
+ this._editor.selection.restore();
+ }).bind(this),
+
onSetup: (function() {
elById(idButtonSave).addEventListener(WCF_CLICK_EVENT, this._save.bind(this));
}).bind(this),