-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make snippet buttons invisible rather than hidden to prevent issues #479
Conversation
On Chrome, clicking the icon de-selected the snippet, which caused the button to disappear and the onClick to never get called. This makes the button transparent instead, which means the onClick still gets called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really able to reproduce the bug which this PR should fix. I'm running chrome 129.0.6668.58 on fedora.
@elpoelma Hmm, I was able to reproduce it, but I used the snippet that was used in the video in the Jira ticket, and didn't test extensively with other snippets. Can you try again using that one? If you can't find it, the snippet was a relatively long paragraph of text, long enough to increase the size of the snippet node from the minimum. Perhaps that is a necessary condition for this bug to appear? I used Chromium 128.0.6613.137 on Arch. |
@piemonkey I tested it with the same 'lorem ipsum' snippet, but still could not reproduce the issue. I'll see if I can try to reproduce it with the previous chrome version, but that would be a big coincidence. Update: tested it with chromium 128, but still can't reproduce the issue |
it seems I managed to make the button black in the screenshot, this went away though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I can still trigger the bug even with these changes
Chromium 128.0.6613.84
The trick seems to be setting |
@piemonkey bonus fix you can add: (the reason you set it before is because the AU modal uses focus-trap, which takes over focus control and gives it back to the last element that was focused before it activated) |
I think this is the best way to approach this issue. As a rule of thumb, with ember block nodes with content, it's better to only put |
@abeforgit I've made the button container not contenteditable. I couldn't reproduce the bug with my previous change though, so could you test whether it fixes it for you? |
@abeforgit @piemonkey can confirm that the |
Overview
On Chrome, clicking the icon de-selected the snippet, which caused the button to disappear and the onClick to never get called. This makes the button transparent instead, which means the onClick still gets called.
connected issues and PRs:
Jira ticket: https://binnenland.atlassian.net/browse/GN-5019
GN PR: lblod/frontend-gelinkt-notuleren#716
Setup
N/A
How to test/reproduce
Seems to only be easily reproducible in GN/RB and on Chrome. After inserting a snippet, the buttons that appear when the snippet is selected are now functional wherever you click on them. Before clicking on the icon would not work. Moving the selection away from the snippet should hide the buttons.
Challenges/uncertainties
Seems like weird timing issues and is very hard to debug.
Checks PR readiness