Skip to content

Commit

Permalink
Fix: Turn off rendering interactive forms (#430)
Browse files Browse the repository at this point in the history
- Checkbox/radio button styling can be incorrect with interactive forms
- Interactive styling is distinct and some customers don't want it
- Forms are pseudo-interactive - changed data isn't actually saved
  • Loading branch information
tonyjin authored Oct 10, 2017
1 parent ec908ba commit 99bdf48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/lib/viewers/doc/DocBaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,7 @@ class DocBaseViewer extends BaseViewer {
container: this.docEl,
linkService: new PDFJS.PDFLinkService(),
// Enhanced text selection uses more memory, so disable on mobile
enhanceTextSelection: !this.isMobile,
renderInteractiveForms: true
enhanceTextSelection: !this.isMobile
});

// Use chunk size set in viewer options if available
Expand Down
8 changes: 3 additions & 5 deletions src/lib/viewers/doc/__tests__/DocBaseViewer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ describe('src/lib/viewers/doc/DocBaseViewer', () => {
stubs.emit = sandbox.stub(docBase, 'emit');
});

it('should turn on enhanced text selection if not on mobile and turn on rendering of interactive forms', () => {
it('should turn on enhanced text selection if not on mobile', () => {
docBase.options.location = {
locale: 'en-US'
};
Expand All @@ -691,8 +691,7 @@ describe('src/lib/viewers/doc/DocBaseViewer', () => {
expect(stubs.pdfViewerStub).to.be.calledWith({
container: sinon.match.any,
linkService: sinon.match.any,
enhanceTextSelection: true,
renderInteractiveForms: true
enhanceTextSelection: true
});
});

Expand All @@ -708,8 +707,7 @@ describe('src/lib/viewers/doc/DocBaseViewer', () => {
expect(stubs.pdfViewerStub).to.be.calledWith({
container: sinon.match.any,
linkService: sinon.match.any,
enhanceTextSelection: false,
renderInteractiveForms: true
enhanceTextSelection: false
});
});

Expand Down

0 comments on commit 99bdf48

Please sign in to comment.