Semantic-ui: [1.0] accordion in modal, the little scrolling problem.

Created on 25 Nov 2014  路  3Comments  路  Source: Semantic-Org/Semantic-UI

for example:

  1. every item in accordion collapsed, no scroll bar
  2. expand the items to let the content exceed the viewport, the scroll bar does not appear
  3. call .modal('refresh'), the scroll bar appears
  4. collapse every item, the scroll bar disappears
  5. expand the items to let the content exceed the viewport , the scroll bar appears
  6. the scroll bar works expectedly.

I'd like to be in step 6 when initialized when the initial content does not need scrollbars, I tried to call .modal('refresh') after step 1, no effect. The problem is that if I want to be in step 6, I have to be through step 3. Any guide?


I tried to add 'scrolling' class as in 'ui scrolling modal', no difference.


Here is another related problem:

  1. let the scroll bar appear
  2. let the viewport be larger so that the scroll bar disappear
  3. let the content exceed the viewport
    The problem is that after step 3, the scroll bar does not appear.

I consider to do .modal('refresh') when it is possible to do something with the scroll bars, but the modal may jump not as expected


I just found 1.0.0 release has been released, and tried it, the scroll bars never appears any more.

Discussion

Most helpful comment

Had same problem. as @jlukic suggested Try
$('.ui.accordion').accordion({onOpen: function(){$('.ui.modal').modal('refresh')}}); The modal will refresh and allow scrolling but I do not like the re-positioning effect.. I am not sure if there's a better workaround

All 3 comments

Modal has been significantly rewritten. Glad things worked out. Modals do have to be refreshed after the height changes, which unfortunately may happen frequently with an accordion.

Had same problem. as @jlukic suggested Try
$('.ui.accordion').accordion({onOpen: function(){$('.ui.modal').modal('refresh')}}); The modal will refresh and allow scrolling but I do not like the re-positioning effect.. I am not sure if there's a better workaround

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deneuxa picture deneuxa  路  3Comments

vinhtq picture vinhtq  路  3Comments

kntmrkm picture kntmrkm  路  3Comments

sarbona picture sarbona  路  3Comments

guilhermeblanco picture guilhermeblanco  路  3Comments