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

Add URL to history #39

Closed
aldendaniels opened this issue Sep 21, 2013 · 2 comments
Closed

Add URL to history #39

aldendaniels opened this issue Sep 21, 2013 · 2 comments

Comments

@aldendaniels
Copy link
Owner

Right now the back button doesn't work if you leave a codr.io document.

@aldendaniels
Copy link
Owner Author

While testing a fix to this I ran across a pernicious IE bug. IE does not correctly close the socket when the window is refreshed or left via the back button. As a result, we need to manually close the socket. socket.close() does not appear to work, so we send down our own "close" event instead that we handle server-side.

Worse, when the user navigates back to the same page via the forward button, IE magically resurrects the closed socket.

Both the above IE bugs will be handled as part of this job as they relate to window.location.

aldendaniels added a commit that referenced this issue Jan 20, 2014
- Add url to history on document creation.

- Fix IE bus:

1. IE does not correctly close the socket when the window is refreshed
or left via the back button. As a result, we need to manually close the
socket. socket.close() does not appear to work, so we send down our own
"close" event instead that we handle server-side.

2. When the user navigates back to the same page via the forward button,
IE magically resurrects the closed socket.
aldendaniels added a commit that referenced this issue Jan 20, 2014
See the extensive comment in init-app.js about this nasty Chrome bug.
This was causing codr.io to refresh at a frenetic pace whenever you
accessed it from Chrome.

The change to index.html is an unrelated removal of illegal </input>
tags.
@aldendaniels
Copy link
Owner Author

Yuck. Re-opening again. We need to make it so that the title shows up correctly in history. Right now they all show up as "Untitled" for new documents and "Loading . . ." for old ones.

To consider: use history.js
https://github.com/browserstate/history.js/wiki/The-State-of-the-HTML5-History-API

aldendaniels added a commit that referenced this issue Jan 26, 2014
After a losing a great deal time fighting numerous incompatibilities, I
finally settled on this approach that appears to make history reasonable
across browsers.

In IE, there's not much we can do. It always says 'codr.io' and new
documents get no history entry.

In FF and GC things work better. To work around a FF issue we don't load
the new title until we get the new URL. I think there are better ways to
work around this, but it's not worth more time at this point.
aldendaniels added a commit that referenced this issue Jan 27, 2014
Avoids delay before setting the title on a new document creation.
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

1 participant