Ticket #4782 (new defect)
[patch][ccla]IFrame relative offset problem in dojo.coords()
| Reported by: | guest | Owned by: | sjmiles |
|---|---|---|---|
| Priority: | normal | Milestone: | future |
| Component: | HTML | Version: | 0.9 |
| Severity: | normal | Keywords: | |
| Cc: | amimalik@…, doughays, bill |
Description (last modified by doughays) (diff)
It seems that when I want to use/draw a widget inside an IFrame Dojo (version 0.9.0) does not take into account the relative position of the IFrame in the parent page. This causes popups like Tooltips to appear outside of the IFrame. This testcase should demonstrate the behaviour:
<html>
<head>
<script type='text/javascript'
djConfig=' isDebug: true, usePlainJson: true' src='dojo/dojo.js'></script>
<script type='text/javascript'>
dojo.addOnLoad(function init() {
window.frames["frm"].document.write("<html><body><div id='tip0'>hover</div></body></html>");
var id = window.frames["frm"].document.getElementById('tip0');
var c = dojo.coords(id);
console.log("x: " + c["x"] + " y: " + c["y"]);
});
</script>
</head>
<body class="tundra">
<iframe name="frm" id="frm" width="300" height="300" frameborder="0"
scrolling="yes" style="position:absolute;left:200px;top:200px;"></iframe>
</body>
</html>
The (x,y) coordinates of the element should take into account the IFrame offset.
Thank you!
- Amir
Attachments
Change History
Note: See
TracTickets for help on using
tickets.