Question

I am trying to create a modal window with windowManager.open({...}) that will have a (probably long) list of items. Only way to ensure that it will display properly is to set fixed height to modal and make it's content scrollable.

Documentation on windowManager.open isn't really helping me here. I was able to find some examples describing scrollbars option:

editor.windowManager.open({        
    scrollbars: true,                    
    height: 300,
    ...            
});

But it is not working for me. If only someone could give me a hint on this, maybe I need to use some kind of Panel for my modal's body?

I will really appreciate if someone could update my Fiddle.

Was it helpful?

Solution

Hah, I've spent all of yesterday trying to figure this out but as soon I've posted my question I've found the answer myself.

I was trying to repaint the dialog after setting overflow: auto manually by calling win._bindings.repaint[0]() and it gave me an error:

Cannot read property 'autoScroll' of undefined

And it turned out that autoScroll is what I was looking for:

editor.windowManager.open({        
    autoScroll: true,                    
    height: 300,
    ...            
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top