Skip to content

[v4] Modal flickering when within .list-group-item #25206

Closed

Description

@gizburdt

Hi,

In some cases the modal filckers (see video).

bootstrap

This is the html:

<div class="row align-items-center">
    <div class="col-md-6">
        <strong>Test</strong> <br>
        Street 1 31 <span><span class="badge badge-info">Primary</span></span> <br>
        1234AA Amsterdam <br>
    </div> 

    <div class="col-md-6 text-right"><!----> 
        <div class="d-inline-block text-left">
            <a href="#" class="btn btn-sm btn-warning">Edit</a> 
            
            <div tabindex="-1" role="dialog" id="editModalLHzoKhSu" class="modal fade">
                <div role="document" class="modal-dialog">
                    <form class="modal-content">
                        <div class="modal-header"><p id="editAddressModalLabel" class="modal-title h5">Edit address</p> <button type="button" data-dismiss="modal" aria-label="Close" class="close"><span aria-hidden="true">×</span></button>
                        </div> 

                        <div class="modal-body">
                            // Form
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

If you need more info, please let me know :)

  • OS: MacOS,
  • Browser: Chrome 63.0.3239.84

Activity

  1. Ruffio commented on Jan 5, 2018

    @Ruffio

    @gizburdt do you have some custom css/js that can cause this? Can you make a jsbin or similar that demonstrates this behaviour?

  2. Johann-S commented on Jan 5, 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 Jan 5, 2018
  4. added
    v4v4, the frozen docs on gh-pages
    and removed
    v4v4, the frozen docs on gh-pages
    on Jan 7, 2018
  5. gizburdt commented on Jan 9, 2018

    @gizburdt
    Author

    Hmm, will have a look at it. The code is nested in my project (and Vue), so I will have a try moving it to JSbin.

    Extra info: The error is not present in 4.0.0-beta.2, but it is in 4.0.0-beta.3

  6. gizburdt commented on Jan 18, 2018

    @gizburdt
    Author

    Here is the JS bin: https://jsbin.com/sitemohuno/2/edit?html,js,output

    The problem happens when the modal is within a list-group-item. Normally I place my modals at the bottom of the body, but I can't in my current project, because i'm using vue components.

  7. changed the title [-][v4] Modal flickering in some cases[/-] [+][v4] Modal flickering when within .list-group-item[/+] on Jan 18, 2018
  8. gizburdt commented on Jan 18, 2018

    @gizburdt
    Author

    @Johann-S Looks like this is causing the problem:

    .list-group-item:hover{ z-index: 1; }

  9. namnh06 commented on Jan 19, 2018

    @namnh06

    I met this problem already, not happen in beta 2 but in beta 3, it's very annoy. It happen in list-group-item confirm.
    Using SPA Angular Js + bootstrap 4 beta 3.
    Run on Chrome, ubuntu 16.04.

  10. ysds commented on Jan 19, 2018

    @ysds
    Contributor

    This is not a browser bug. This occurs because the z-index: 1 of a .list-gorup-item:hover cause a new stacking context.

    I created a very simple pen: https://codepen.io/anon/pen/ppqbeq
    You can see the modal backdrop (z-index: 1040) is above the modal (z-index: 1050) when hovering.

  11. namnh06 commented on Jan 19, 2018

    @namnh06

    @ysds any idea to fix this bug man ?

  12. ysds commented on Jan 19, 2018

    @ysds
    Contributor

    I don't have a solution right now, but it is certain to put a modal HTML outside a item without z-index.

  13. gizburdt commented on Jan 19, 2018

    @gizburdt
    Author

    Quick fix for now:

    .list-group-item, .list-group-item:hover{ z-index: auto; }

  14. ysds commented on Jan 19, 2018

    @ysds
    Contributor

    Now is the time to back to #16432 !

  15. namnh06 commented on Jan 22, 2018

    @namnh06

    @gizburdt Thank you, it's worked.
    @ysds Thank to you.

  16. ibussieres commented on Jan 23, 2018

    @ibussieres

    Strangely, the same solution did not work for me. On bootstrap 4.0.0.

  17. namnh06 commented on Jan 23, 2018

    @namnh06

    @ibussieres i'm working on bootstrap 4.0.0 after upgrade from beta 3, it's still working bro.

  18. ibussieres commented on Jan 23, 2018

    @ibussieres

    I've got it working now. Thanks !

  19. nathanosoares commented on Jan 27, 2018

    @nathanosoares

    Quick fix for now:
    .list-group-item, .list-group-item:hover{ z-index: auto; }

    it works on 4.0.0
    @gizburdt Thank you

  20. added
    cssSass sources or compiled CSS
    and removed
    awaiting-replyWaiting on the author; an issue closes after 14 days without reply
    on Jan 29, 2018
  21. mdo commented on Apr 1, 2018

    @mdo
    Member

    Duplicate of #23916.

  22. YunshuaiPeng commented on Nov 20, 2018

    @YunshuaiPeng

    Quick fix for now:

    .list-group-item, .list-group-item:hover{ z-index: auto; }

    可以使用了,thanks!
    @gizburdt

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

    cssSass sources or compiled CSSv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions