Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try another approach to fixing the sibling inserter in Firefox #7530

Merged
merged 4 commits into from
Jun 26, 2018

Commits on Jun 25, 2018

  1. Try another approach to fixing the sibling inserter in Firefox

    This PR partially fixes #7508. It is an alternate version of #7525, though much the same.
    
    In #7220 we introduced a new behavior for the sibling inserter, which requires a click on the plus in the center as opposed to just clicking between two blocks.
    
    Turns out it was sort of a race condition between onClick and onMouseDown, the latter which fires first. So in a way, the Firefox and Safari behavior of selecting the block (which is selected onMouseDown) as opposed to clicking the sibling inserter was the correct one.
    
    This PR "fixes" it by also making the sibling inserter use onMouseDown. But in addition to this, it uses onClick as well, so it's still keyboardable.
    
    The net effect is that both work, with the added benefit that in Firefox and Safari, the block that you're hovering isn't briefly "selected" when you're clicking.
    jasmussen committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    ce868e2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    93c7ebe View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2018

  1. Fix issues in Firefox and Safari

    Turns out this issue has been present in some hidden form for a long time, and _partially fixed_ in Chrome. But there has always been a race condition, it looks like, between onClick, onFocus and onMouseDown.
    
    This commit simply adds the "onFocusInserter" action to the onMouseDown event as well, which seems to solve the issue.
    
    You still briefly see the block being selected and the toolbar appearing in Firefox and Safari, but at least this can work as a hotfix pending further investigation or improvements.
    jasmussen committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    743c219 View commit details
    Browse the repository at this point in the history
  2. Add comment.

    jasmussen committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    dcc06d1 View commit details
    Browse the repository at this point in the history