I see what you mean, but I think this is an intentional design decision. Otherwise, there wouldn't be anyway to get rid of that box after clicking the dropdown.
If you open this page http://www.startlap.hu/#b21013123 (Hungarian page)
and search for "Módosítom" and click it I think it might help as an example of a well working custom dropdown. One may note that this dropdown is the correct width and does not close immediately when the cursor exists it but a few seconds later allowing the user to momentarily exit it.