I’ve added a popup widget that I want to show when text is selected. The code for the widget looks like this:
#selection-popup { display: block; z-index: 1000; } <div id="selection-popup" cm-ignore-events="true" style="position: absolute; top: 26px; left: 81px;"> <div class="btn-group"> <button type="button" class="btn btn-primary"> <span class="glyphicon glyphicon-comment"></span> </button> <button type="button" class="btn btn-primary"></button> <button type="button" class="btn btn-primary"></button> </div> </div>
I’m using code like this to attach the widget to a point:
selectionPopup = document.getElementById('selection-popup'); c.addWidget({line: anchor.line, ch: anchor.ch}, selectionPopup);
When I select a line with plenty of space under it, the popup shows just fine, like in this screenshot:
But then, when I select the last line, the popup is cut off:
I assume this has something to do with the div overflowing out of the parent. Any advice on how to handle this?