Skip to content

Toplevel scrollbar appears, when mathlive elements exceed height window height in a fixed height container with scrollbars #971

Closed

Description

@mindreframer

Description

Toplevel scrollbar appears, when mathlive elements exceed height window height in a fixed height container with scrollbars.
Screenrecording:

Steps to Reproduce

Actual Behavior

A window scrollbar appears, as if trying to accommodate for the mathlive elements, that are contained in a fixed-height HTML element with overflow-y configuration.

Expected Behavior

The window scrollbar should not be influenced by mathlive elements in a fixed-height HTML container

Environment

MathLive version
0.68.1

Operating System
macOS 10.15.7

Browser

  • bug happens in Chrome, Safari, Brave. Firefox seems to handle it correctly though.

Activity

  1. mindreframer commented on Jun 2, 2021

    @mindreframer
    Author

    Also I want to apologize for reporting another bug!
    This one seems to be somewhat tricky... I'm not sure how to explain this, took me some time to narrow down the cause of this issue. I was blaming it initially on CSS, until I have noticed that this does not happen if I am not rendering Mathlive elements.
    I was happy, that it is reproducible. I hope this is not a major re-architecture issue (fingers crossed).

  2. arnog commented on Jun 2, 2021

    @arnog
    Owner

    The report is very clear. Thanks for taking the time isolating and documenting the problem. It appears that the height of a containers that contains mathfield influences the height of its parent. That seems incorrect, but I'm a bit concerned that this appears to be browser specific: this may indicate an issue that may need to be fixed in the browser engine (both Chrome, Safari and Brave share a lot of code). I'll have a look at it, though and see if I can get a handle on this and devise a workaround.

  3. mindreframer commented on Jun 2, 2021

    @mindreframer
    Author

    @arnog Thanks for looking into it!

  4. arnog commented on Jun 3, 2021

    @arnog
    Owner

    OK, I have a fix for this but I don't like it very much.:

    math-field { position: absolute; }

    I'm inclined to think that Webkit/Blink is misbehaving, but I'm not 100% sure.

    Anyway, you can use the workaround above for now, and I'll check-in a more permanent fix by setting the default position of the MathfieldElement to absolute as well, but this still doesn't feel quite right...

  5. self-assigned this
    on Jun 3, 2021
  6. mindreframer commented on Jun 3, 2021

    @mindreframer
    Author

    @arnog this does not work for me, I have a mix of math-field and plain span text elements, rendered inline. I'm using display: inline-block; for the wrapping element of math-field. With math-field { position: absolute; } everything is just more distorted.

    I guess this is one of those killer bugs, that is impossible to fix in the user-land. 😞 The app is still useable, it just looks weird, but I guess that can be one of those fact-of-life issues.

    Thanks and maybe we have another working idea later.

  7. arnog commented on Jun 3, 2021

    @arnog
    Owner

    Sorry, I meant relative

  8. mindreframer commented on Jun 3, 2021

    @mindreframer
    Author

    @arnog Yes, this works! :) Awesome, thank you very much! Not sure if this should be default, but good to know there is a way to handle it. 🙇

  9. mindreframer commented on Jun 3, 2021

    @mindreframer
    Author

    From my perspective I consider this issue resolved.

    It looks like there are 2 options: documenting it or making relative position default. Documenting it seems like a less "risky" approach, but maybe we try it as new default and wait for the bug reports pouring in? If there are no new bug reports - this change can be considered OK.

    Life of an open-source software maintainer is hard...

  10. arnog commented on Jun 3, 2021

    @arnog
    Owner

    :)
    Yes, I'm leaning towards changing the default to position: relative. Like you said, it's a potentially a bit risky, but we'll see if it introduces any undesirable side effects if the bug reports start pouring in. In general, I like to avoid relying on documentation to work around problem as in my experience you cannot rely on people reading documentation.

  11. mindreframer commented on Jun 3, 2021

    @mindreframer
    Author

    Sounds like a reasonable decision. Thanks again for the quick resolution of this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions