obsidian-hover-editor icon indicating copy to clipboard operation
obsidian-hover-editor copied to clipboard

FR: Track popover layer in order of most recently accessed

Open nothingislost opened this issue 3 years ago • 0 comments

Currently there are only 3 popover layers, new (z-index 32), active (z-index 31), and normal (z-index 30).

The layer order for popovers in the "normal" category is determined by most recently opened. A more natural order would be most recently active.

The easiest way to do this would be setting the z-index based on the last accessed timestamp but I'm trying to do this while fitting within Obsidian's z-index guidelines which only gives us z-index 30-45. Anything higher than 45 and popovers start appearing over things like slides, modals, notices, menus, etc.

Layering can also be controlled based on the DOM ordering. However, adjusting the DOM order of the popovers on the fly can cause issues with the editor. One example is that the editor will reset its scroll position to the top whenever it's moved in the DOM.

nothingislost avatar Mar 15 '22 04:03 nothingislost