Issue with position:sticky in custom HTML prompt

This will probably require an answer from @peternlewis, as I'm pretty sure it's something in the code. And I'm not even sure it's a bug, I'm just looking for an explanation :).

I still use Mojave on my iMac, due to some 32-bit apps and a need to run virtual macOSes. I'm trying to display a table using a custom HTML prompt with the position:sticky CSS setting, so I can have fixed table headers.

In Safari on Mojave, my test table works perfectly. But in a custom HTML prompt in Keyboard Maestro, the header isn't sticky. When I look at it with the inspector, the problem is pretty obvious:

And yet, in Safari on the same OS, it's supported:

In Monterey on my laptop, everything works fine, which furthers my confusion—I thought maybe Keyboard Maestro included its own WebKit build, and it was an older version that couldn't handle position:sticky on table elements. But I'm running KM10 on both Macs.

If I view the source within the Keyboard Maestro Custom HTML Prompt window, then save the source to an HTML file and open it in Safari, it works. It's just in the Custom HTML Prompt window that it won't work.

Any clarity appreciated.


Well, I solved it, but I have no idea why it's solved. The solution? Apparently in the old days of Safari on macOS, you had to use position: -webkit-sticky to make it work. So I tried that in Keyboard Maestro, and success—it works in Mojave now!

I'd still love to understand why this was required, but it's working!


1 Like