Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't warn when navigating away from a modified form, if printing has occurred (issue 12262) #12265

Merged
merged 3 commits into from
Aug 22, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

This solution is obviously not perfect, since printing being cancelled will thus remove the warning as well. However, a similar problem already exists for saving, since the user may cancel that one as well.

All-in-all, since way cannot really detect with absolute certainty that either saving or printing actually finished, this seems good enough for now.

Fixes #12262

… occurred (issue 12262)

This solution is obviously *not* perfect, since printing being cancelled will thus remove the warning as well. However, a similar problem already exists for saving, since the user may cancel that one as well.

All-in-all, since way cannot really detect with absolute certainty that either saving or printing actually finished, this seems good enough for now.
@Snuffleupagus
Copy link
Collaborator Author

Snuffleupagus commented Aug 22, 2020

Somewhat unrelated, however: Shouldn't the following method have been marked as "private", since I cannot imagine that it's correct to ever call it manually?

setModified() {
if (!this._modified) {
this._modified = true;
if (typeof this.onSetModified === "function") {
this.onSetModified();
}
}
}

Please note that I'll happily add another commit here, fixing this, if we agree that it's a desirable change!

…he `annotationStorage` parameter (PR 12241 follow-up)

Obviously it doesn't make sense to call that method without providing an `AnnotationStorage`-instance, however we should ensure that doing so won't cause errors.
Hence we need to check that `annotationStorage` is actually defined, before attempting to call its `resetModified` method.
@timvandermeij
Copy link
Contributor

timvandermeij commented Aug 22, 2020

[...] it's a desirable change

I would say that's indeed desirable and most likely just something we missed in review.

…PR 12241 follow-up)

Since it shouldn't be called manually, we can just mark it as "private".
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/6f9fcc75c340eca/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/9c1b76667f00d74/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/6f9fcc75c340eca/output.txt

Total script time: 3.79 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/9c1b76667f00d74/output.txt

Total script time: 4.69 mins

  • Unit Tests: Passed

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/49e00b657fafc07/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/49e00b657fafc07/output.txt

Total script time: 3.27 mins

Published

@timvandermeij timvandermeij merged commit 364b9cc into mozilla:master Aug 22, 2020
@timvandermeij
Copy link
Contributor

Thank you for helping out with polishing the form fill implementation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annotation storage modification state is not cleared when printed
3 participants