2

In all native menu elements (like input date type, select, datalist) menu opens up on top of all elements and if viewport size is small then it comes out of browser screen. So is it possible to get same behavior in custom javascript component?

enter image description here

Akhlesh
  • 2,389
  • 1
  • 16
  • 23
  • 1
    No. The browser renders those GUI elements and allows them to be drawn outside of the window. That isn't a JavaScript or HTML thing. It's dependent on how the browser draws and renders the items. – adprocas Mar 27 '18 at 18:28
  • 2
    Not on purpose -- I've seen an IE bug that did that, but it was hard to replicate. Ultimately, web code is meant to live inside the web browser's window. – Doug Mar 27 '18 at 18:28
  • The closest thing you could do, is create a pop-up window. This may help you get started down that path: https://stackoverflow.com/questions/9276086/popup-window-to-return-data-to-parent-on-close – Doug Mar 27 '18 at 18:32
  • I thought about popup window but it can not be styled like a menu and IE doesn't support context passing. – Akhlesh Mar 27 '18 at 18:34

0 Answers0