Skip to content

Issue/460editor content loss - #4927

Merged
aforcier merged 3 commits into
developfrom
issue/460editor-content-loss
Dec 16, 2016
Merged

Issue/460editor content loss#4927
aforcier merged 3 commits into
developfrom
issue/460editor-content-loss

Conversation

@maxme

@maxme maxme commented Dec 16, 2016

Copy link
Copy Markdown
Contributor

Fixes wordpress-mobile/WordPress-Editor-Android#460

I also removed some old code (quick pic/video handler) that could lead to post deletion when the user comes back from the media picker.

@maxme maxme added this to the 6.3 milestone Dec 16, 2016
@aforcier aforcier self-assigned this Dec 16, 2016
getTitle();
getContent();
} catch (IllegalEditorStateException e) {
AppLog.e(T.EDITOR, "toggleHtmlMode: unable to get title or content");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to reset the toggle button state here with toggleButton.setChecked(false), otherwise it's left in a pressed state and might cause content loss issues when pressed again (as the HTML -> visual flow is triggered).

@aforcier

Copy link
Copy Markdown
Contributor

The instrumentation tests are currently failing as EditorFragmentTest needs to be updated to handle IllegalEditorStateException too.

@aforcier

Copy link
Copy Markdown
Contributor

Looks good! Hope this solves the problem.

Left a few comments, should be good to go with those addressed.

@maxme

maxme commented Dec 16, 2016

Copy link
Copy Markdown
Contributor Author

@aforcier ready for another pass.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be wrapped in a getActivity().runOnUiThread(...).

@maxme
maxme force-pushed the issue/460editor-content-loss branch from ad163ab to e3baf0f Compare December 16, 2016 16:04
@aforcier

Copy link
Copy Markdown
Contributor

:shipit:

@aforcier
aforcier merged commit 5a5d681 into develop Dec 16, 2016
@aforcier
aforcier deleted the issue/460editor-content-loss branch December 16, 2016 16:36
@maxme

maxme commented Dec 16, 2016

Copy link
Copy Markdown
Contributor Author

Cherry picked in release/6.3 (I targeted the wrong branch in this PR)

malinajirka added a commit that referenced this pull request Sep 29, 2020
60e13dd828 Merge pull request #461 from wordpress-mobile/travis-25
6b4f78a59c Update example app to API 25
3d0a8c8fcc Update Travis to use API25
5cafc2f59a Merge branch 'develop' of https://github.com/wordpress-mobile/WordPress-Android into develop
c5023cca1c Fix EditorFragmentTest after adding getContent exception throw
702a7241c5 Fix an issue in the Hybrid editor that could lead to an empty post title and content on save
fead4827bb Merge pull request #4927 from wordpress-mobile/issue/460editor-content-loss
a9ae13d377 Fix EditorFragmentTest after adding getContent exception throw
93a6017bd1 Fix an issue in the Hybrid editor that could lead to an empty post title and content on save
2069d60cbf Updating grade plugin
c5ee8a976e Upgrade to Support Lib, build tools v25.0.1
141e508e98 Updating build tools and compile/targetSDK to 25 along with support libraries
b6f8331feb update missing build files to 2.2.2
f36efa05b9 Updated to gradle v2.2.2
8a0b518157 Update to Android Gradle Plugin 2.2.1

git-subtree-dir: libs/editor
git-subtree-split: 60e13dd828824b308252c9842d9c459db26a9f56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants