Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.0.3] Text editor not compatible with browser back button #50

Closed
cdamken opened this issue Nov 13, 2014 · 11 comments
Closed

[7.0.3] Text editor not compatible with browser back button #50

cdamken opened this issue Nov 13, 2014 · 11 comments
Milestone

Comments

@cdamken
Copy link

cdamken commented Nov 13, 2014

expected behavior

modify a text, save and click back in browser and goes back to the files directory

actual behavior

modify a text, save and click back in browser and stay in the editing, but path appears 2 times up.

if you press many times (back) it goes randomly to any page you had open (I still can't explain why it jumps to different pages)

In reference of : owncloud/core#12134

@jancborchardt @LukasReschke @DeepDiver1975 @PVince81

@PVince81
Copy link
Contributor

Ideally the text editor should have its own unique URL, but the infrastructure to support this (and make other apps plug into that system) is not there.

A possible workaround would be for the files app to broadcast an event "closeApp" or something whenever the browser back button is hit, and the text editor would listen to it and close itself when told to.

@cdamken
Copy link
Author

cdamken commented Nov 14, 2014

Maybe a modify/save warning too.

@michaelstingl
Copy link

Similar case

If you open a text file and in the text file you click on the "Go back one page"-button of the browser, you will rest in the text file, but in the background ownCloud returns to the previous folder.

Steps to reproduce

  1. Create a folder "text file test".
  2. Go in the new folder "text file test".
  3. Create a text file "textfile.txt".
  4. Open the text file "textfile.txt".
  5. Click on the "Go back one page"-button of the browser.
  6. Now close the text file with the ownCloud button (on the top under your username).
  7. You are now a folder back and not in the folder "text file test"-folder anymore.

Server configuration

Operating system:
OS: RHEL 7

Web server:
Apache/2.4.6 (Red Hat)

PHP version:
PHP 5.4.16

ownCloud version: (see ownCloud admin page)
7.0.3 (stable)

Client configuration

Browser:
Firefox 33

Is it possible to fix this error/bug? When I click on the "Go back one page"-button of the browser, I would like to go back to the folder where I was when I clicked on the text file, like in ownCloud 6.

@MorrisJobke

00002190

@cdamken
Copy link
Author

cdamken commented Jan 5, 2015

@PVince81 How about the workaround? #50 (comment)

@DeepDiver1975
Copy link
Member

Out of scope for OC8 -> OC8.1

@PVince81
Copy link
Contributor

Prerequisite work in core: owncloud/core#13414

@DeepDiver1975 DeepDiver1975 modified the milestones: 8.2-next, 8.1-current Apr 30, 2015
@oparoz
Copy link
Contributor

oparoz commented Jun 30, 2015

If you don't need IE9 compatibility, this works well

$(window).bind('popstate', function () {
    if (myApp.active === true) {
        // Calling my close button
    }
});`

@DeepDiver1975
Copy link
Member

@oparoz mind sending a pr? Thanks a lot!

@oparoz
Copy link
Contributor

oparoz commented Jul 1, 2015

Not sure as this requires knowledge of the way the app works, creation of new steps in history and new calls for the close button. Usually, the browser's back button goes back one step in its history, but some apps don't add a new step and simply modify the current URL in order to not be inserted in history...

I'll gladly help the maintainer though.

@tomneedham
Copy link
Contributor

Fixed with version 2 #78 thanks @oparoz

@michaelstingl
Copy link

Steps to reproduce

Create a folder "text file test".
Go in the new folder "text file test".
Create a text file "textfile.txt".
Open the text file "textfile.txt".
Click on the "Go back one page"-button of the browser.
Now close the text file with the ownCloud button (on the top under your username).
You are now a folder back and not in the folder "text file test"-folder anymore.

I can confirm: Closing text editor with browser back button keeps user in the current directory. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants