Page is scrolled to the iframe with RAP application [message #1229285] |
Thu, 09 January 2014 00:10  |
Eclipse User |
|
|
|
Hello, RAP community!
Open the html with the RAP application in iframe:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RAP IFRAME</title>
</head>
<body>
<p>
Top
</p>
<iframe scrolling="no" src="http://rap.eclipsesource.com/rapdemo/examples" style="position:absolute;top:800px;" width="800" height="600" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" allowtransparency="true"></iframe>
</body>
</html>
the page will be scrolled down to the iframe. Why? I guess it appears due to rap element focusing, but how to include our RAP application in other sites without this scrolling?
Best regards,
Yury.
|
|
|
|
Re: Page is scrolled to the iframe with RAP application [message #1231033 is a reply to message #1230923] |
Mon, 13 January 2014 12:04  |
Eclipse User |
|
|
|
I can reproduce this behavior, even with a simple snippet application.
The reason is, as you expect, that there is always a "focus control" in
SWT. The browser's behavior is to scroll the focused element into view.
I can't think of a simple fix, but feel free to open an enhancement
request. I guess you can also create an example without RAP (a focused
form element in an iframe?). If so, maybe you can find some advise on
StackOverflow.com on how to prevent the browser from scrolling the
iframe into view...
Regards,
Ralf
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Powered by
FUDForum. Page generated in 0.23660 seconds