Skip to content

Carousel slide.bs.carousel event direction bug in IE11 #26290

Closed

Description

@AntonioMIN

I found carousel event bug in IE11

Description

$('.carousel').carousel({ // For all carousel
interval: false
}).on('slide.bs.carousel',function(arg){
if(arg.direction=='left')
{ // slide left
/* CODE /
}
else
{ // slide right
/
CODE */
}
});
arg.direction value is fine just first one time. but after the one time always return "left"

Activity

  1. AntonioMIN commented on Apr 13, 2018

    @AntonioMIN
    Author

    additionally, i tested v4.0 and v4.1, but result is same.

  2. Johann-S commented on Apr 13, 2018

    @Johann-S
    Member

    Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via CodePen or JS Bin and report back with your link, Bootstrap version, and specific browser and OS details.

  3. added
    awaiting-replyWaiting on the author; an issue closes after 14 days without reply
    on Apr 13, 2018
  4. AntonioMIN commented on Apr 13, 2018

    @AntonioMIN
    Author

    This bug was my mistake..not bootstrap issue. But i found other issue about modal in IE11. Modal doesn't open twice. This issue is also occur in https://getbootstrap.com/docs/4.1/components/modal/ too.
    OS : Windows 10 64bit
    Browser : Internet Explorer 11
    Bootstrap v4.1

  5. Kramb commented on Apr 13, 2018

    @Kramb
    Contributor

    Demo of bug w/ Collapse
    bootstrap v4.1.0
    IE 11

    The bug for IE occurs when calling the hide event for Collapse and Modal, and the slide event for the Carousel.
    From what I have discovered, this issue is from the new function _objectSpread(target).
    More specifically, the error occurs when the argument is passed to Object.keys().
    In IE, an Object must be passed to Object.keys() as the browser has no handler for non-objects.
    In Chrome, if a non-object is passed to Object.keys(), it returns an empty array and the function continues with no issue.

  6. Kramb commented on Apr 13, 2018

    @Kramb
    Contributor

    Changing variable ownKeys in the _objectSpread() function to the following seems to fix the issue:

    var ownKeys = typeof source === 'object' ? Object.keys(source) : [];
  7. Johann-S commented on Apr 13, 2018

    @Johann-S
    Member

    Can you provide an example for the carousel @Kramb ?
    For the collapse plugins and some other it'll be fixed by: #26291 and it's related to: #26266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-replyWaiting on the author; an issue closes after 14 days without reply

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions