Refined-github: `table-input` is not a modal

Created on 15 Dec 2020  路  3Comments  路  Source: sindresorhus/refined-github

  1. On this issue鈥檚 comment field
  2. Click the table-input button
  3. Click anywhere on the page

The dropdown should close, but it doesn't.

Kapture 2020-12-14 at 19 44 36

Modals like the "canned replies" automatically closes by design, without any JavaScript. table-input should be modified so it natively closes like the rest of the modals, it should probably never be explicitly closed via JS.

bug help wanted

All 3 comments

I may be wrong, but I remember it working as supposed to when the feature was first added. It was probably broken by GH updates. I'll take a look at it.

Seems like adding a tooltip on the button disrupts the modal functionality. The "canned replies" input also doesn't have a tooltip, so my guess is that GitHub doesn't implement this in the first place.

I tried a few things, including moving the tooltip to the <details> element itself, to no avail. Unless someone more familiar with the GitHub DOM has a solution, we'll just have to drop the tooltip. It's not perfect, but imo having a functioning modal is more important than having a tooltip.

Seems like adding a tooltip on the button disrupts the modal functionality

You're right, that's because both use :before.

It won't be _accessible,_ but we can wrap the SVG in a div with the tooltip attribute. Better than nothing at all.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

durka picture durka  路  3Comments

pawelad picture pawelad  路  3Comments

yakov116 picture yakov116  路  3Comments

Arcanemagus picture Arcanemagus  路  3Comments

MilesBHuff picture MilesBHuff  路  3Comments