obsidian-tasks icon indicating copy to clipboard operation
obsidian-tasks copied to clipboard

Tooltip Truncated Under Callout Title

Open Azurewren opened this issue 2 years ago • 13 comments

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.

image|My vault, plugins enabled image|Sandbox vault, Tasks only

Steps to Reproduce

  1. 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).
  2. Set the task codeblock to be in short mode
  3. 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;
}

Azurewren avatar May 10 '22 09:05 Azurewren

Thank you for the detailed report @Azurewren!

schemar avatar May 13 '22 18:05 schemar

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

AnnaKornfeldSimpson avatar Jul 11 '22 06:07 AnnaKornfeldSimpson

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.

claremacrae avatar Jul 11 '22 08:07 claremacrae

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.

oldakos avatar Jul 20 '23 09:07 oldakos

Thanks very much @oldakos.

claremacrae avatar Jul 20 '23 09:07 claremacrae

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

manakov-dev avatar Mar 12 '24 17:03 manakov-dev

Thanks.

claremacrae avatar Mar 12 '24 19:03 claremacrae