wkeese / delite

Bill's in-progress work on delite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

delite/popup: allow opting out from the addition of scrolling capabilities to the popup wrapper (avoid double scrolling when using a popup with scrolling capabilities)

AdrianVasiliu opened this issue · comments

Because delite/popup sets "native" scroll on the popup wrapper, it doesn't seem that delite/popup supports the use-case of a popup which has scrolling capabilities by itself. In the current delite/deliteful context, this means in particular that if you use a widget implementing delite/Scrollable (such as deliteful/ScrollableContainer or deliteful/list/List), you may get two scrollable elements embedded one in the other. Also, this makes it difficult to rely on more advanced scrolling capabilities provided by the popup widget, such as the paging capabilities of deliteful/list/PageableList.

Solving this issue might be as simple as making it it optional via a flag (public or protected). Detail: at least for a scrolling popup based on delite/Scrollable, there is no need that delite/popup sets the size of the popup widget. Setting for instance "height: inherit" on the scrollable container allows an automatic size adjustment to the actual size of the popup wrapper.

Finally, secondary remarks:

  • As long as it keeps (optionally) setting the overflowY, I think it would better set it to "auto" than "scroll", in order to avoid unnecessary scrollbars when the content is smaller than the popup.
  • If I'm not mistaken, nowadays the preferred way to set style is to add CSS classes by code rather than setting directly style properties by code.

(Initially noted in ibm-js@4d1ddb9#commitcomment-7609753.)

Argh, created in your fork by mistake (will go to ibm-js/delite). Sorry.