obsidian-tasks
obsidian-tasks copied to clipboard
Tooltip Truncated Under Callout Title
Expected Behavior
The tooltip that appears when hovering over a task should show above callout title bars.
Current Behavior
The tooltip appears layer wise under the callout title bar. The callout content area in a narrow callout also forms a horizontal scroll bar.
Steps to Reproduce
- Insert a few tasks into a callout. The tasks needs to have a multi-lined tooltip (ie. is recurring, scheduled and any other thing to lengthen the tooltip).
- Set the task codeblock to be in
short mode
- Hover mouse over top/first task listed.
The callout and tasks codeblock I used in the sandbox vault is:
>[!note]
> ```tasks
> short mode
> ```
Context (Environment)
- Obsidian version: 0.14.6
- Tasks version: 1.5.1
- [X] I have tried it with all other plugins disabled and the error still occurs. I tested this out in the Obsidian sandbox with only Tasks installed (Second image is a screenshot of the Sandbox).
Possible Solution
I have tried setting some personal css snippet code to see if changing the z-index will fix the issue. So far this has not been successful.
.callout,
.callout-title {
z-index: 0;
}
.tooltip {
z-index: 99999;
}
Thank you for the detailed report @Azurewren!
There seems to be some special-casing of blockquote
at https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Task.ts#L434 - I wonder if this needs to be extended to callouts, somehow? I do not have the knowledge to investigate further, at the moment, but figured I would mention this.
cc @claremacrae
Thanks!
Looking at the history, that was done for https://github.com/obsidian-tasks-group/obsidian-tasks/issues/371 - where the >
is after the [ ]
.
The callout issue is tasks that look like this > - [ ]
are not even detected as tasks in the first place.
However, see the example in that issue, it will provide a useful test scenario for this one, to make sure we don't break that behaviour.
For anybody who might find it useful, I found a (partial) workaround for this - but only in the context of reading mode.
This is the css snippet that makes the behavior serviceable:
.callout, .callout-content{
overflow:visible;
}
However, I couldn't get short-mode pop-ups to work nicely in Live Preview Editing mode. Even outside of callouts, i.e. just in a simple tasks-query-codeblock, they are restricted to the area of the codeblock.
Thanks very much @oldakos.
Found working solution, may break something another with codeblocks because I'm not sure about purpose of 'contain', but at first glance - everything ok
.cm-editor .cm-contentContainer .cm-preview-code-block.cm-embed-block.markdown-rendered{
overflow: visible;
contain: layout!important;
}
Also I have no problems in reading mode by default for some reason
Thanks.