after closing the image, the images list will stay in the same position.#716
after closing the image, the images list will stay in the same position.#716noveens wants to merge 1 commit into
Conversation
|
@noveens, thanks for your PR! By analyzing the history of the files in this pull request, we identified @oparoz and @manishbisht to be potential reviewers. |
|
Okay, so the reason why it did the "browser back button" thing is because of URL changes. Before you open the image, the URL looks like "http://localhost/owncloud/index.php/apps/files/?dir=/test&fileid=14". When you click on the arrows to switch images, it will also change the URL. Then using the browser back button would bring you to the previous URL and image. This is the purpose of this URL changing. When closing before your PR, it would simulate clicking on the back button which would go back to the previous URL. However this logic triggers file app code for reloading the current folder, even though the current folder hasn't changed. Your PR is not 100% correct because it only closes the slideshow but leaves the URL as is. I think the correct fix is to rather fix the files app code to not trigger a reload if the URL path did not change, this is this ticket: owncloud/core#15520. Fixing this one is likely to also fix the problem for any other app. @noveens can you have a look at owncloud/core#15520 instead ? Thanks for looking into this. While this PR is not the right fix, it provided insights about what the gallery app is actually doing 😄 |
|
@PVince81 , When an image is opened, a new state is pushed onto the browser history stack. Now, in the requests for this bug, So, IMO, we have 2 options as of now:
Feel free to contradict this or add any arguments. Thanks. |
|
In large directories, a refresh takes a very long time, so refreshing and then restoring the position is NOT a good solution. My vote is option #1. I don't see the need for pushing a browser state for an overlay. An overlay isn't a page change, it shouldn't be considered a back-button history event. |
|
I agree with @qwertymodo |
|
@noveens have you tried fixing owncloud/core#15520 ? The file list refresh is caused by the fact that the on pop state event always tells the file list (not the full page) to reload regardless whether the path has changed or not. |
|
@PVince81 , |
|
Fix at : owncloud/core#27282 |
Fixes: 26318 ( issue at owncloud/core )
(LINK : owncloud/core#26318 )
Licence: MIT or AGPL
Description
After clicking the exit button on the image pop-up, the list doesn't seem to stay at the same row, and this PR fixes that.
Tested on
TODO
Check list
Reviewers
@PVince81 @DeepDiver1975