Feature Requests

Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.

[Closed] iframe onload focus fix

  • dave
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 2 months ago - 9 years 8 months ago #1 by dave
[Closed] iframe onload focus fix was created by dave
I've had issues with joomdles loading of scorm content when using the wrapper with any moodle template. If my list of course lessons is long and a user selects a lesson at the bottom of the page the scorm content loads but the focus is at the same place as the lessons link. In my case, I can't use the auto height feature as it doesn't work properly with scorm content. the scorm content loads only the top portion of the activity in chrome. see this explanation for the issue if you are interested ( www.joomdle.com/forum/tips-tricks/11565-...scorm-package-issues ).

To fix the focus issue I edited the following: components/com_joomdle/views/wrapper/tmpl/default.php and added this line after the width:
onload="scroll(0,0);"

Edited code
Code:
<div class="contentpane"> <iframe id="blockrandom" class="autoHeight" src="<?php echo $this->wrapper->url; ?>" width="<?php echo $this->params->get('width', '100%'); ?>" onload="scroll(0,0);" scrolling="<?php echo $this->params->get('scrolling', 'auto'); ?>" <?php if (!$this->params->get('autoheight', 1)) { ?> height="<?php echo $this->params->get('height', '500'); ?>" <?php } ?> align="top" frameborder="0" <?php if ($this->params->get('autoheight', 1)) { ?> onload='itspower(this, false, true, 20)' <?php } ?> webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> </div>

Hope this helps someone else and gets incorporated into a future release
Last edit: 9 years 8 months ago by Antonio Durán.

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic iframe onload focus fix
Hi Dave.

Thank you very much for sharing your improvements. We'll check it and most probably include it with next release, if it is working fine.

Please Log in or Create an account to join the conversation.