Do you have an issue with a specific file(s)?
No, this happens with all files including your online showcase.
Can you reproduce using one of our samples or online demos?
Yes, this GIF I have attached is on your online example:
Are you using the WebViewer server?
No
Does the issue only happen on certain browsers?
Unsure, but it happens in latest Chrome.
Is your issue related to a front-end framework?
Yes, we are testing out the pdfTron webviewer as part of a POC to use this software.
Is your issue related to annotations?
No
Please give a brief summary of your issue
If you are in the ‘Edit text’ → ‘Edit content’ mode and are either editing existing text or adding a new paragraph, changes will not be saved unless you first manually unfocus the field via clicking on a background element.
For us this stops us from using the software as we cant have our clients lose the content changes they entered, as they will often be writing paragraphs at a time.
Please describe your issue and provide steps to reproduce it
Go into ‘Edit content’ mode.
Select a field and make changes to the text.
Exit ‘Edit content’ mode without having unfocused the field you have changed.
Note: this happens in various circumstances, including changing tabs per the second half of the GIF.
Please provide a link to a minimal sample where the issue is reproducible
Refer to attached GIF
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems like you’re encountering an issue where changes made in the ‘Edit content’ mode of Apryse WebViewer are not being saved if the field remains focused when you exit the mode. This is a known behavior that can occur if the text editing input is not properly committed before switching modes or tabs.
Some things you can try:
Programmatically trigger a blur event on the text field when exiting the ‘Edit content’ mode to ensure changes are saved.
Implement a custom save handler that forces the current input to commit changes before mode switch or tab change.
Check if the issue persists across different browsers and apply browser-specific fixes if necessary.
Here are some resources that might help you:
Text Editing Guide - Provides details about editing text content in WebViewer and how to handle text fields.
Content Edit Sample - Explore the sample code to understand how content editing is managed.
Forms Guide - Learn how to use form fields and manage their interactions in WebViewer.
Modular UI Guide - Find out how to customize user interface components and behaviors.
Hopefully, this helps you solve your problem while you wait for a human to get back to you.
This is the expected behavior. When a user is typing, we just interact with the HTML and no data is sent to the worker, so it cannot be saved.
If you want to save before switching tools, you can either create a save changes button that would do this:
// get the Id of the content box that is currently selected
const contentEditManager = instance.Core.documentViewer.getContentEditManager();
const annotation = instance.Core.annotationManager.getSelectedAnnotations()[0];
const contentBoxId = annotation.getCustomData("contentEditBoxId");
// get the content box by Id and stop editing
const box = contentEditManager.getContentBoxById(contentBoxId);
box.stopContentEditing();
Or submit a feature request to, for example, add a dialog alerting the user that some changes are not saved yet and invite them to save before switching tools.
When submitting a feature request, we advise providing an answer to those 3 questions to help prioritize and get context:
What is the workflow in which you would use the requested feature?
Why is the feature valuable to you and your users?
How are you coping without it right now?
I don’t see a workaround for what you are trying to achieve.