Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Browser Widget focus problem(Browser Widget focus problem)
Browser Widget focus problem [message #917900] Thu, 20 September 2012 10:49 Go to next message
frank b is currently offline frank b
Messages: 36
Registered: July 2009
Member
Hello,

I have a simple RAP application that holds two views. The first view owns a treeviewer displaying several topics to the user. The second view owns a Browser widget displaying html file content depending on the selected topic in the first view (via Selection provider mechanism). The problem is when I click on the browser widget, its view is not activated, as if it hadn't the focus. It looks like the browser widget does not respond to mouse events !

How can I force browser widget and its view and have focus ?

thks a lot,
frank
Re: Browser Widget focus problem [message #917916 is a reply to message #917900] Thu, 20 September 2012 11:02 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim Buschtoens
Messages: 355
Registered: July 2009
Senior Member
Hi!

For security reasons, browser usually do not propagate events that are
fired within an iframe (the document of the browser widget) to its
parent (the browser widget itself). If the iframe document has the same
domain (e.g. the content was loaded with the browser#setText method) it
is possible to communicate between the two by javascript. In that case
it might be possible to focus the browser widget with a JS hack.

Greetings,
Tim


> Hello,
>
> I have a simple RAP application that holds two views. The first view
> owns a treeviewer displaying several topics to the user. The second view
> owns a Browser widget displaying html file content depending on the
> selected topic in the first view (via Selection provider mechanism). The
> problem is when I click on the browser widget, its view is not
> activated, as if it hadn't the focus. It looks like the browser widget
> does not respond to mouse events !
>
> How can I force browser widget and its view and have focus ?
>
> thks a lot,
> frank

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Browser Widget focus problem [message #917924 is a reply to message #917916] Thu, 20 September 2012 11:13 Go to previous messageGo to next message
frank b is currently offline frank b
Messages: 36
Registered: July 2009
Member
Hi Tim,

could you please be more explicit. I've understood that I have to deal with JS but do not know where and how !!!!

Is all this related to this topic : http://www.eclipse.org/forums/index.php/mv/msg/37228/120981/#msg_120981

thanks
Re: Browser Widget focus problem [message #917997 is a reply to message #917924] Thu, 20 September 2012 12:28 Go to previous message
frank b is currently offline frank b
Messages: 36
Registered: July 2009
Member
found a way to solve the problem using Tim's advice : browser function facility in onclick body event

thks Tim !
Previous Topic:Session Recovery
Next Topic:Table column content as hyperlink
Goto Forum:
  


Current Time: Fri Apr 18 11:58:45 EDT 2014

Powered by FUDForum. Page generated in 0.01508 seconds