Skip to content

Commit 961a76c

Browse files
committed
Squashed 'libs/editor/' changes from fa030e4..10ae495
10ae495 Merge pull request #395 from wordpress-mobile/issue/394-mutationobserver-error-log ebf1208 Continue to next removed node if an invalid node is detected 8a2589a Fix #394 (avoid undefined removedNode.attributes error in onMutationObserved) e6015b2 Merge branch 'develop' of github.com:wordpress-mobile/WordPress-Editor-Android into develop bbd044e 1.1 version bump 01a4329 update file modes git-subtree-dir: libs/editor git-subtree-split: 10ae495d48b8c97d92b4b02d30a13bb82c1b33e4
1 parent 5da21ed commit 961a76c

File tree

10 files changed

+7
-2
lines changed

10 files changed

+7
-2
lines changed

WordPressEditor/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ android {
2222
buildToolsVersion "23.0.3"
2323

2424
defaultConfig {
25-
versionCode 10
26-
versionName "1.0"
25+
versionCode 11
26+
versionName "1.1"
2727
minSdkVersion 14
2828
targetSdkVersion 23
2929
}

WordPressEditor/src/main/res/drawable-hdpi/ic_close_white_24dp.png

100755100644
File mode changed.

WordPressEditor/src/main/res/drawable-hdpi/media_icon_32dp.png

100755100644
File mode changed.

WordPressEditor/src/main/res/drawable-xhdpi/ic_close_white_24dp.png

100755100644
File mode changed.

WordPressEditor/src/main/res/drawable-xhdpi/media_icon_32dp.png

100755100644
File mode changed.

WordPressEditor/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png

100755100644
File mode changed.

WordPressEditor/src/main/res/drawable-xxhdpi/media_icon_32dp.png

100755100644
File mode changed.

libs/editor-common/assets/ZSSRichTextEditor.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ ZSSEditor.onMutationObserved = function(mutations) {
235235
mutations.forEach(function(mutation) {
236236
for (var i = 0; i < mutation.removedNodes.length; i++) {
237237
var removedNode = mutation.removedNodes[i];
238+
if (!removedNode.attributes) {
239+
// Fix for https://github.com/wordpress-mobile/WordPress-Editor-Android/issues/394
240+
// If removedNode doesn't have an attributes property, it's not of type Node and we shouldn't proceed
241+
continue;
242+
}
238243
if (ZSSEditor.isMediaContainerNode(removedNode)) {
239244
// An uploading or failed container node was deleted manually - notify native
240245
var mediaIdentifier = ZSSEditor.extractMediaIdentifier(removedNode);

libs/editor-common/assets/svg/delete-image.svg

100755100644
File mode changed.

libs/editor-common/assets/svg/edit-image.svg

100755100644
File mode changed.

0 commit comments

Comments
 (0)