mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix: UI addition mutation observer interfering with new rich-text mutation logic
This commit is contained in:
parent
6d803246ec
commit
be8a89e01e
@ -5,6 +5,7 @@ HumHub Change Log
|
||||
1.3.0-beta.2 (Unreleased)
|
||||
--------------------------
|
||||
- Enh: Added CounterSet Widget to handle Space/Profile header statistic counts
|
||||
- Fix: UI addition mutation observer interfering with new rich-text mutation logic
|
||||
|
||||
|
||||
1.3.0-beta.1 (July 4, 2018)
|
||||
|
@ -19,7 +19,6 @@ humhub.module('comment', function (module, require, $) {
|
||||
that.addComment(response.html);
|
||||
that.getInput().val('').trigger('autosize.resize');
|
||||
richText.$.trigger('clear');
|
||||
//richText.focus();
|
||||
that.getUpload().reset();
|
||||
}).catch(function (err) {
|
||||
module.log.error(err, true);
|
||||
@ -224,6 +223,7 @@ humhub.module('comment', function (module, require, $) {
|
||||
var toggleComment = function(evt) {
|
||||
var visible = evt.$target.is(':visible');
|
||||
evt.$target.slideToggle(undefined, function() {
|
||||
debugger;
|
||||
evt.$target.find('.humhub-ui-richtext').trigger('focus');
|
||||
});
|
||||
};
|
||||
|
@ -239,7 +239,7 @@ humhub.module('ui.additions', function (module, require, $) {
|
||||
var observer = new MutationObserver(function (mutations) {
|
||||
mutations.forEach(function (mutation) {
|
||||
var $nodes = $(mutation.addedNodes).filter(function () {
|
||||
return this.nodeType === 1; // filter out text nodes
|
||||
return this.nodeType === 1 && !$(this).closest('.humhub-ui-richtext').length; // filter out text nodes and ignore richtext changes
|
||||
});
|
||||
|
||||
$nodes.each(function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user