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 <skyler.grey@collabora.com>
This commit is contained in:
Skyler Grey 2025-11-27 16:49:08 +00:00
parent fcbf00a8d6
commit 9ab3d5bf9e
No known key found for this signature in database
2 changed files with 2 additions and 7 deletions

View file

@ -183,12 +183,7 @@ describe('Direct editing (legacy)', function() {
.should('be.visible') .should('be.visible')
cy.get('.saveas-dialog input[type=text]') cy.get('.saveas-dialog input[type=text]')
.should('be.visible') .should('be.visible')
.should('have.value', 'document.odt') .should('have.value', 'document.rtf')
cy.get('.saveas-dialog input[type=text]')
.clear()
cy.get('.saveas-dialog input[type=text]')
.type('/document.rtf')
cy.get('.saveas-dialog button.button-vue--vue-primary').click() cy.get('.saveas-dialog button.button-vue--vue-primary').click()

View file

@ -474,7 +474,7 @@ const documentsMain = {
SaveAs, SaveAs,
{ {
path: documentsMain.fileName, path: documentsMain.fileName,
format: args.Format, format: args.format,
}, },
(value) => value && PostMessages.sendWOPIPostMessage('loolframe', 'Action_SaveAs', { Filename: value, Notify: true }), (value) => value && PostMessages.sendWOPIPostMessage('loolframe', 'Action_SaveAs', { Filename: value, Notify: true }),
) )