We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a8055c commit 6b142dfCopy full SHA for 6b142df
1 file changed
v3/js/opt-frontend.js
@@ -152,9 +152,17 @@ function initTogetherJS() {
152
hashchangeSignalFromRemote = true;
153
try {
154
console.log("TogetherJS RECEIVE hashchange", msg.appMode);
155
- if (appMode != msg.appMode) {
156
- appMode = msg.appMode; // assign this to the GLOBAL appMode
157
- updateAppDisplay();
+
+ // TODO: this will infinite loop if you hit the "back button"!
+ if (msg.appMode != appMode) {
158
+ // UGH: need to do this to keep the URL hashes consistent across
159
+ // clients, or else the hashchange trigger won't fire
160
+ if (msg.appMode == 'edit') {
161
+ enterEditMode();
162
+ }
163
+ else if (msg.appMode == 'display') {
164
+ enterDisplayMode();
165
166
}
167
168
finally {
0 commit comments