IE 11 Resize Bug

info's Avatar

info

03 Oct, 2017 02:19 PM

Hi there

I have downloaded the newest version of royalslider and it works great! Thank you!
The only problem is that the option "imageScaleMode: 'fit'" doesn't work in IE 11.
The user has to resize the IE 11. After that the image fits in the browser.
I've tried to generate a "resize-event" with JS after the royalslider init but that doesn't work.

Can you pls help me?

  1. Support Staff 1 Posted by Dmitry Semenov on 03 Oct, 2017 03:27 PM

    Dmitry Semenov's Avatar

    Hello,

    Can you please link to the page with the issue?

    Dmitry

  2. 2 Posted by info on 03 Oct, 2017 03:33 PM

    info's Avatar

    Hi Dmitry

    Here the link of the respective website:
    https://www.kopp-fenster.ch/produkte/ <https://www.kopp-fenster.ch/produkte/>

    Just click on one of the four galleries / pictures.

    Your help is very much appreciated.

  3. Support Staff 3 Posted by Dmitry Semenov on 03 Oct, 2017 04:02 PM

    Dmitry Semenov's Avatar

    Make sure that you initialize slider after your lightbox is opened and slider root element is visible on page.

    It seems the issue is related to http://help.dimsemenov.com/kb/royalslider-jquery-plugin-issues/slid...

  4. 4 Posted by info on 04 Oct, 2017 06:20 AM

    info's Avatar

    Hi Dmitry

    I initialized the slider after the lightbox was added to the dom. I've also tried to call the $('.royalSlider').royalSlider('updateSliderSize', true); function and the $(window).trigger('resize'); function via console, after royalslider was fully loaded, but it didn't work in IE 11. It only works when I resize the window manually.

  5. Support Staff 5 Posted by Dmitry Semenov on 04 Oct, 2017 02:00 PM

    Dmitry Semenov's Avatar

    've also tried to call the $('.royalSlider').royalSlider('updateSliderSize', true); function and the $(window).trigger('resize'); function via console, after royalslider was fully loaded, but it didn't work in IE 11

    The updateSliderSize is the only method that slider triggers on page resize, so issue is either related to some other component, or CSS itself, try making a reduced test case based on example in docs ( http://dimsemenov.com/plugins/royal-slider/slider-in-lightbox/ )

  6. 6 Posted by info on 04 Oct, 2017 02:12 PM

    info's Avatar

    Hi Dmitry

    I tried your example http://dimsemenov.com/plugins/royal-slider/slider-in-lightbox/ with IE 11 and I've got the same problem. The slider size is not correct. I tried the $('.royalSlider').royalSlider('updateSliderSize', true); function and the $(window).trigger('resize'); function via console and the example didn't resize. It only appears correctly when I resize the window manually. I attached 2 pictures to this reply. The first one contains the error and the second one shows you, how it should look like.

  7. Support Staff 7 Posted by Dmitry Semenov on 04 Oct, 2017 03:01 PM

    Dmitry Semenov's Avatar

    Indeed, you're right, my bad.

    Interesting bug, can you try adding the styles from your main stylesheet and not from <style> tag in ajax loaded file ( https://www.kopp-fenster.ch/produkte/holzfenster-lightbox.html )

  8. 8 Posted by info on 04 Oct, 2017 03:13 PM

    info's Avatar

    Hi Dmitry

    Why should I do that? I personally don't think that this is a CSS-Bug but a JS-Bug because it is on your example too. The height of the royalSlider-Container is not calculated correctly. Could it be, that IE 11 doesn't fire a resize event at slider init?

  9. Support Staff 9 Posted by Dmitry Semenov on 04 Oct, 2017 03:58 PM

    Dmitry Semenov's Avatar

    Pretty sure it's a CSS bug, have you tried moving styles from ajax-loaded file or not?

  10. 10 Posted by info on 05 Oct, 2017 06:52 AM

    info's Avatar

    Hi Dmitry

    It works! Thank you! But what was the problem?

  11. Support Staff 11 Posted by Dmitry Semenov on 05 Oct, 2017 11:28 AM

    Dmitry Semenov's Avatar

    Just the location of CSS, IE never cease to amaze.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac