I have a somewhat strange behavior happening with the modalframe implementation (through automodal.module). When opening a node (page), the modalframe opens just fine, but it auto scrolls down to the first link within the body. So if I have a 1000 word node, and the link is at the bottom, the window will scroll all the way down to the bottom and highlight that link by placing a small blue border around it.

The project is on a VPN so I can't get you access to it but I have attached a screenshot to help explain what is going on. Any help would be very much appreciated.

Thanks!

CommentFileSizeAuthor
screenshot.jpg235.6 KBesource

Comments

jonathanhuot’s picture

I'm impacted with this issue in my own implementation.

+1 to get some help.

mrconnerton’s picture

I agree this is an issue. I was able to fix it with a small bit of jquery however.

The key is to add an onLoad setting to the modal.

What is the implementation of the auto modal? In my case I am using auto modal so I used its settings alter hook with the following code:

(function ($) {
  Drupal.automodal = Drupal.automodal || {};
  Drupal.automodal.settingsAlter = Drupal.automodal.settingsAlter || {};
  Drupal.automodal.settingsAlter.myModule = function(settings) {
    settings.onLoad = function (self, iFrameWindow, iFrameDocument) {
      $('html, body', iFrameDocument).animate({scrollTop:scroll}, 'fast');
    };
    return settings;
  }
})(jQuery);

I'm sure you can use this to modify your implementation.

dsnopek’s picture

Version: 6.x-1.7 » 7.x-1.x-dev
Component: User interface » Code
Category: Support request » Bug report
Issue summary: View changes

I am able to reproduce this bug on the latest 6.x-1.x version! It appears to be finding the first link in the child and focusing on it. I'm using Chrome 29.0.1547.76 on Linux. I haven't had a chance to dig into what's going on. Before doing that, I'd like to establish if this bug is present in the Drupal 7 version too and fix it there first if necessary.

liquidcms’s picture

yes, this is a bug in D7 version as well.

liquidcms’s picture

and the code in #2 works to fix this (although its still a bug and that code shouldn't be needed).