datasette / datasette-write-ui

A Datasette plugin that adds UI elements to edit, insert, or delete rows in SQLite tables
Apache License 2.0
15 stars 2 forks source link

Potential fix for clipped menu bug #20

Closed simonw closed 9 months ago

simonw commented 10 months ago

Refs:

I have a potential fix for this bug:

CleanShot 2023-09-09 at 15 03 16@2x

With the fix applied:

maybe-fix

simonw commented 10 months ago

There may well be a more elegant way of solving this, but this was the first thing I could find that actually worked.

simonw commented 10 months ago

One problem with this is that it behaves very strangely if you resize the window after opening a menu:

resize-menu-bug

I think the problem here is that we already relocated the menu to document.body which means future calls to measure its position will fail.

asg017 commented 9 months ago

Thanks for your comments in the code - made it much easier to review!