Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.1k stars 4.95k forks source link

[Dimmer] Locked scroll page when I use page dimmer #6509

Closed rccorrea-zz closed 6 years ago

rccorrea-zz commented 6 years ago

After I use page dimmer, scroll page stop to working in touchscreens (usually mobile phones).

Steps

  1. Add references:

    <link rel="stylesheet" type="text/css" href="semantic/semantic.min.css">
    <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
    <script src="semantic/semantic.min.js"></script>
  2. After start body tag (inside it), add page dimmer:

    <div id="dimmerPage" class="ui page dimmer">
        <div class="content">
            Hello
        </div>
    
        <div class="ui button" onclick="hideDimmer();">
            Close
        </div>
    </div>
    
    <p>
        <div class="ui button" onclick="showDimmer();">1</div>
    </p>
  3. Insert function to show and hide page dimmer:

    <script>
        function showDimmer() {
            $('#dimmerPage').dimmer('show');
        }
    
        function hideDimmer() {
            $('#dimmerPage').dimmer('hide');
        }
    </script>

Expected Result

Touchscreen allow to scroll normally (before dimmer, it works).

Actual Result

Scroll page using touch stop working. In Chrome > F12 > Ctrl + Shift + M > Elements > Event Listeners: I see a new event, called 'preventScroll', I think that this event, when hide dimmer, needed to be removed.

Version

2.3.3

Testcase

https://jsfiddle.net/p3kd6abf/9/

ColinFrick commented 6 years ago

Duplicate of #6449

lubber-de commented 5 years ago

Fixed in https://github.com/fomantic/Fomantic-UI 2.7.0