| Summary: | [Link] Hyperlink produces script error if anchor tag (<a>) is missing | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Andre Weber <andre.weber> | ||||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | ivan, rsternberg | ||||||||
| Version: | 1.3 | ||||||||||
| Target Milestone: | 1.4 M2 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | sr131 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Andre Weber
I wasn't able to reproduce this problem so far. Could you please add a snippet? Created attachment 177707 [details]
Snippet to reproduce
I was able to reproduce this problem with the attached snippet.
Steps to reproduce:
1. click on the link
2. click on the "restore" button
3. see this error message in the firebug console:
hyperlinks[this._currentFocusedLink] is undefined
in: hyperlinks[ this._currentFocusedLink ].blur();
Created attachment 177728 [details]
Patch against RAP 1.3
Attached a patch that fixes the problem for RAP 1.3
Ralf, I think that resetting this._currentFocusedLink to -1 in Link.js#clear() is better. What do you think? (In reply to comment #4) > Ralf, I think that resetting this._currentFocusedLink to -1 in Link.js#clear() > is better. What do you think? Good point. I agree that the focus index should be reset to -1 in clear(). But since I saw those range checks in _onKeyPress, i wanted to be on the safe side for the service release. Created attachment 177746 [details] Updated patch against RAP 1.3 This patch resets the focus index to -1 in clear() as suggested in comment #4 AND adds range checks in _setFocusedLink() Fixed in CVS HEAD. The problem was caused by the field _currentFocusedLink being out of range in Link.js, _setFocusedLink(). Applied last patch to maintenance 1.3 branch. |