Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355869 - [Webapp] Error: "Can't move focus to the control" while performing search
Summary: [Webapp] Error: "Can't move focus to the control" while performing search
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.8 M3   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-25 12:03 EDT by Snehasish Paul CLA
Modified: 2011-10-25 16:15 EDT (History)
2 users (show)

See Also:


Attachments
Added try-catch block (688 bytes, patch)
2011-08-25 12:19 EDT, Snehasish Paul CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Snehasish Paul CLA 2011-08-25 12:03:59 EDT
Build Identifier: 

If user types some junk characters, say "aaaa" as search keyword, when toc view is active, and presses 'Enter' key.
A JavaScript error is thrown "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.", occurs at line no. 214 of helptree.js.
If user has Visual Studio is installed in users machine, then user's get a prompt of the same error. If no Visual Studio installed, then in IE at status bar, "Error on Page" status is shown for a second, until the search view refreshes again.

Reproducible: Always

Steps to Reproduce:
If user types some junk characters, say "aaaa" as search keyword, when toc view is active, and presses 'Enter' key.
A JavaScript error is thrown "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.", occurs at line no. 214 of helptree.js.
If user has Visual Studio is installed in users machine, then user's get a prompt of the same error. If no Visual Studio installed, then in IE at status bar, "Error on Page" status is shown for a second, until the search view refreshes again.
Comment 1 Snehasish Paul CLA 2011-08-25 12:19:09 EDT
Created attachment 202163 [details]
Added try-catch block

Added a try-catch block. So when the toc view page is hidden, focusOnItem(...) method does not through exception on the page, when executes the anchor.focus() call at hidden anchor element.
Comment 2 Chris Goldthorpe CLA 2011-08-25 13:14:13 EDT
I'm not seeing this problem. What build were you using?
Comment 3 Snehasish Paul CLA 2011-08-29 10:08:30 EDT
(In reply to comment #2)
> I'm not seeing this problem. What build were you using?

Steps to Reproduce:

1. Using Eclipse SDK version: 3.7.0
   Build id: I20110727-2000
2. Open Help Contents in External browser (IE)
3. Select a HTML topic and wait till help content renders in the right content view, or else open:
  http://127.0.0.1:<xxxx>/help/topic/org.eclipse.jdt.doc.user/tips/jdt_tips.html
4. Type 'aaaa' as search keyword and press 'Enter' key (do not select 'Go' button).
5. Observe the IE browser status bar, shows an 'Error on Page' icon just for a second at some intermediate state, which again clears off.

A JavaScript error is thrown "Can't move focus to the control because it is
invisible, not enabled, or of a type that does not accept the focus.", occurs
at line no. 214 of helptree.js

If user has Visual Studio installed and use Eclipse Help browser to view the help, then user gets an error prompt.
Comment 4 Chris Goldthorpe CLA 2011-10-25 16:15:52 EDT
I have committed the suggested fix to the master branch