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

IE11 long modal scrolling #1759

Closed
sergez opened this issue Jun 10, 2017 · 12 comments
Closed

IE11 long modal scrolling #1759

sergez opened this issue Jun 10, 2017 · 12 comments
Labels

Comments

@sergez
Copy link

sergez commented Jun 10, 2017

dimmed isn't assigned/added to body when opening long modal in IE11

Steps

  • Open long modal in IE11

Expected Result

The modal should be scrollable

Actual Result

The modal isn't scrollable

Version

0.68.5

Testcase

Open in IE11 https://codepen.io/anon/pen/gRrPRo

@marcdibold
Copy link

duplicate? #1157

@layershifter
Copy link
Member

Yep, it's dupe of #1157.

@sergez
Copy link
Author

sergez commented Jun 12, 2017

I'm not sure. Because it's reproduced with one modal and only on IE11

@sergez
Copy link
Author

sergez commented Jun 12, 2017

c'mon guys. It not duplicate. However #1157 reproduced in every browser and this bug reproduced only in IE11. Have you tried to open ONLY ONE long modal in Chrome and in IE11 ?

@sergez
Copy link
Author

sergez commented Jun 12, 2017

I used link to codepen from #1157 to keep it alive. It might confuse you...

@layershifter
Copy link
Member

Ok

@layershifter layershifter reopened this Jun 12, 2017
@layershifter
Copy link
Member

@sergez You're right, thanks for clarification. I've checked in IE and there is really something wrong.

Chrome

_885

IE

_886

@levithomason
Copy link
Member

We can leave this open for investigation, but highly likely that this is a CSS issue which should be fixed over at https://github.com/Semantic-Org/Semantic-UI.

@zlove
Copy link

zlove commented Jul 13, 2017

The problem is probably that IE11 does not support multiple parameters in classList.add(), so the 'dimmed' class is not being added to the body element.

See handlePortalMount() in Modal.js

handlePortalMount = (e) => {
    debug('handlePortalMount()')
    const { dimmer } = this.props
    const mountNode = this.getMountNode()

    if (dimmer) {
      debug('adding dimmer')
      
      // FIXME - needs workaround to work in IE 11?
      mountNode.classList.add('dimmable', 'dimmed')

      if (dimmer === 'blurring') {
        debug('adding blurred dimmer')
        mountNode.classList.add('blurring')
      }
    }

    this.setPosition()

    const { onMount } = this.props
    if (onMount) onMount(e, this.props)
  }

@zlove
Copy link

zlove commented Jul 13, 2017

Using a classList polyfill (https://github.com/yola/classlist-polyfill) resolved this issue for me.

@layershifter
Copy link
Member

@zlove thanks for the investigation 👍 PR is coming

@zlove
Copy link

zlove commented Jul 13, 2017

Happy to help @layershifter. Thanks for the quick fix!

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

No branches or pull requests

5 participants