Description: I run the Collabora iOS-App 0.1(30) and the latest Nextcloud-App for iOS on the iPad. The "back button" on the top left corner of the screen does not really close the document. I do not know, whether this is intended or not, but it might be more intuitive, if the "back button" would also close the document. Opening and using the "back button" once works, the correct document is opened. However, after closing the first document (using the "back button") and opening a different document from within the Nextcloud-App, the previously closed document opens again, instead of the newly selected one (because the "back button" does not really close the document, I guess). Please find screen-recording in https://cloud.test.base4kids.ch/index.php/s/s52qgsmcqHokiC2. Steps to Reproduce: 1. Open any document from within Nextcloud-App for iOS 2. Tap on the back button on the top left of the screen 3. Open **another** document from within Nextcloud-App Actual Results: 1. The selected document appears, when opening with the Collabora App for iOS 2. The file list of the Nextcloud-App appears 3. The file opened in step 1 appears again Expected Results: 1. The selected document appears, when opening with the Collabora App for iOS 2. The file list of the Nextcloud-App appears 3. The file selected in step 2 appears again Reproducible: Always User Profile Reset: No Additional Info:
This could be related with: * 123733: 'Crash when loading the same file twice but first load was not "complete"' * 124898: 'Bad template format same session'
Clarification: with "back button on the top left of the screen" is meant the one at the very top, displayed by iOS itself, that shows a left-pointing triangle and the name of the previous app that started this Collabora Office app, "Nextcloud". Pressing this has the same effect as simply switching back to the Nextcloud app the normal way. It is not Collabora Office's own close button on its toolbar that is meant. Anyway, yes, I can reproduce. Investigating.
when opening a doc from Nextcloud app for the first time. the following happens in the Collabora Office app: #0 0x0000000100ee04a0 in ::-[AppDelegate applicationWillEnterForeground:](UIApplication *) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/AppDelegate.mm:252 #0 0x0000000100ee0598 in ::-[AppDelegate application:openURL:options:](UIApplication *, NSURL *, NSDictionary *) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/AppDelegate.mm:262 #0 0x0000000100ee04e0 in ::-[AppDelegate applicationDidBecomeActive:](UIApplication *) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/AppDelegate.mm:255 #0 0x0000000100ed3b0c in ::-[DocumentViewController viewDidLoad]() at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/DocumentViewController.mm:33 #0 0x0000000100ed41d0 in ::-[DocumentViewController viewWillAppear:](BOOL) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/DocumentViewController.mm:71 #0 0x0000000100e406d4 in ::-[Document loadFromContents:ofType:error:](id, NSString *, NSError **) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/Document.mm:54 When one then switches back to the Nextcloud app, this: #0 0x0000000100ee0420 in ::-[AppDelegate applicationWillResignActive:](UIApplication *) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/AppDelegate.mm:246 #0 0x0000000100ee0460 in ::-[AppDelegate applicationDidEnterBackground:](UIApplication *) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/AppDelegate.mm:249 And when one then chooses another document, and tells the Nextcloud app to open that one in Collabora Office, this: #0 0x0000000100ee04a0 in ::-[AppDelegate applicationWillEnterForeground:](UIApplication *) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/AppDelegate.mm:252 #0 0x0000000100ee0598 in ::-[AppDelegate application:openURL:options:](UIApplication *, NSURL *, NSDictionary *) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/AppDelegate.mm:262 #0 0x0000000100ee04e0 in ::-[AppDelegate applicationDidBecomeActive:](UIApplication *) at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/AppDelegate.mm:255 #0 0x0000000100ed3b0c in ::-[DocumentViewController viewDidLoad]() at /Volumes/TML13/lo/online-ios-co-4/ios/Mobile/DocumentViewController.mm:33 Interesting. Presumably in the -[AppDelegate application:openURL:options:] we should save (?) and close an existing document?
(I spent some days last week on this but could not yet come up with a working solution. Harder problem than expected.)
Created attachment 151470 [details] WIP patch (Just to not accidentally lose it, the work in progress (or, alternatively, misguided first attempt at fix) state from last week, with some refactoring and temporary additional debug output. The basic change here was to close the document and dismiss the DcumentViewController in the openURL method in AppDelegate.)
I can' reproducte this issue any more. I tried with two *.docx files (as ODF files can't currently be edited in the Nextcloud iOS app - this is an other bug filled at Nextcloud as #968305, it's not a public bug tracker and part of the enterprise sub). @AndreasGruhler: can you recheck?
This is still reproducible when opening the a document with the **iOS app**. Currently, you can only reproduce this when opening two different files that can be opened with the iOS app, for instance .odp/.odt. If you open a Microsoft document this will not be reproducible, since the document is opened in the webkit browser on the right-hand side (the "preview" area). For clarification: When you open any document with the **iOS app** from the Nextcloud app (e.g., open with..), two arrows appear on top left. The upper arrow is the one that is misbehaving for successive edits and the topic of this bug. However, this might also be an issue which needs fixing in the Nextcloud app. Please find a screenshot attached that highlights the back button in question. Thanks
Created attachment 154899 [details] Back button which does not close the document
I was just made aware that this button is only visible on larger iPads (like the iPad pro), but not on smaller devices.
*** This bug has been marked as a duplicate of bug 128577 ***