Skip to content

Statically positioned items don't maintain position when the page is scrolled or page dom is modified #1

Description

@nyeholt

If the help icon is attached to an element with position: fixed or dom elements are introduced into the page which changes the location of items, the position of the help icon doesn't update to reflect where it should be positioned.

There's not a really nice way to detect any occasion when an element is added to the dom, so I've added a simple 1 second timer for repositioning elements that need to be moved due to dom updates (don't want to spam it too much because it's rare that items would be affected), and attached it to the window scroll method to handle the other instance. Can you take a look and if you can think of a better way, by all means stick it in? Otherwise, merge back to master?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions