| Summary: | BrowserHistoryEvent not fired anymore after page reload | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Claudio Guglielmo <claudio.guglielmo> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Claudio Guglielmo
I think that this is a duplicate of bug 394401, which has been fixed in master and will be part of the 4-th milestone. *** This bug has been marked as a duplicate of bug 394401 *** Thanks for the fast reply! You're right, the other bug is related, didn't see that sorry. According to your commit at https://github.com/eclipse/rap/commit/f7e19ae28127543f8adac7fa287d23520effdb35, you only removed the check "this._titles[ newHash ] != null", right? It's exactly what I did too at first, but unfortunately it's not sufficient in my opinion. The code at __onHistoryLoad sets the document title. If _titles is empty, the title will be wrong. Or am I missing something? __onHistoryLoad : function(state) { this._state = state; this.createDispatchDataEvent("request", state); if (this._titles[state] != null) { document.title = this._titles[state]; } }, (In reply to comment #2) > Thanks for the fast reply! You're right, the other bug is related, didn't > see that sorry. > > According to your commit at > https://github.com/eclipse/rap/commit/ > f7e19ae28127543f8adac7fa287d23520effdb35, you only removed the check > "this._titles[ newHash ] != null", right? It's exactly what I did too at > first, but unfortunately it's not sufficient in my opinion. The code at > __onHistoryLoad sets the document title. If _titles is empty, the title will > be wrong. Or am I missing something? > > __onHistoryLoad : function(state) { > this._state = state; > this.createDispatchDataEvent("request", state); > if (this._titles[state] != null) { > document.title = this._titles[state]; > } > }, Yes, you are right... the navigation will work, but the browser title will not be as before (will contain the initial RAP application title and will not change till entry is put into the array again) as _titles array will be empty. Ok. Shall I reopen the other bug? (In reply to comment #4) > Ok. Shall I reopen the other bug? I don't think that we can do anything about the titles. (In reply to comment #5) > (In reply to comment #4) > > Ok. Shall I reopen the other bug? > > I don't think that we can do anything about the titles. Ok, no problem. (In reply to comment #6) > Ok, no problem. You could use the new JavaScriptExecutor service to set the title back in the navigation event. |