Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slider frames width bug in IE and Edge #244

Open
Steam-Rabbit opened this issue Feb 24, 2019 · 0 comments
Open

Slider frames width bug in IE and Edge #244

Steam-Rabbit opened this issue Feb 24, 2019 · 0 comments

Comments

@Steam-Rabbit
Copy link

Steam-Rabbit commented Feb 24, 2019

A slider has a frame width calculation bug in IE and Edge due to percent rounding.
The bug is very noticable when frames have an image background.
image 013-min

My quick patch:

Object.defineProperty(Siema.prototype, 'buildSliderFrameItem', {
    value: function(elm) {
        const elementContainer = document.createElement('div');

        elementContainer.style.cssFloat = this.config.rtl ? 'right' : 'left';
        elementContainer.style.float    = this.config.rtl ? 'right' : 'left';
        elementContainer.style.width    = `${this.selectorWidth / this.perPage}px`; // fix

        elementContainer.appendChild(elm);

        return elementContainer;
    }
});

https://codepen.io/steam-rabbit/pen/pYzzRw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant