Skip to content

Commit 9ab3d5b

Browse files
committed
fix(mobile): pass format to SaveAs
With direct access, used in the mobile app, `args.format` was typoed as `args.Format`, leading to format always being undefined. This meant that the save as popup would use the extension of the current file rather than the extension you were trying to save as. You could workaround by editing this manually, but it was annoying and not working as intended. The browser version wasn't broken, as it uses a different code path to save documents (see src/mixins/saveAs.js) Signed-off-by: Skyler Grey <[email protected]>
1 parent fcbf00a commit 9ab3d5b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

cypress/e2e/direct.spec.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,7 @@ describe('Direct editing (legacy)', function() {
183183
.should('be.visible')
184184
cy.get('.saveas-dialog input[type=text]')
185185
.should('be.visible')
186-
.should('have.value', 'document.odt')
187-
188-
cy.get('.saveas-dialog input[type=text]')
189-
.clear()
190-
cy.get('.saveas-dialog input[type=text]')
191-
.type('/document.rtf')
186+
.should('have.value', 'document.rtf')
192187

193188
cy.get('.saveas-dialog button.button-vue--vue-primary').click()
194189

src/document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ const documentsMain = {
474474
SaveAs,
475475
{
476476
path: documentsMain.fileName,
477-
format: args.Format,
477+
format: args.format,
478478
},
479479
(value) => value && PostMessages.sendWOPIPostMessage('loolframe', 'Action_SaveAs', { Filename: value, Notify: true }),
480480
)

0 commit comments

Comments
 (0)