-
Notifications
You must be signed in to change notification settings - Fork 49
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
Trim Reblogs: always show trim button #1013
Trim Reblogs: always show trim button #1013
Conversation
(oh, and yes, I checked what happens if a user removes the disabled attribute and clicks the button; nothing bad occurs.) |
Oh, major problem with this:
I guess you have focus of the button element once you click it and the spacebar clicks it again or something...? Not sure yet, help appreciated. (if this is unsolvable, we could skip using the |
Are we not stopping keydown propagation in the Quick Tags field? We should be doing that for every |
This comment was marked as outdated.
This comment was marked as outdated.
Oh, I bet I know what's happening: because I attached the handlers to the button element without changing the handlers themselves, and they reference This could be fixed either by changing scripts' |
oh right, yeah, definitely do not put popups inside button elements. that's no good on multiple levels. |
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.
Works well with the exception that I can sneak a peak of cursor: pointer
when hovering the very edge of a disabled button. We should attach cursor: not-allowed
to the element that is actually disabled.
Co-authored-by: April Sylph <28949509+AprilSylph@users.noreply.github.com>
Seeing a lot of user reports that Trim Reblogs is broken and I would really like to know if it's a button add failure or a misunderstanding about which posts should be trimmable. Hence:
Description
As described in the linked issue, this disables the trim button on editable but untrimmable posts, rather than not adding it at all.
This uses the native dom
disabled
attribute on the button element and moves the event handlers on control buttons to the button element itself.Resolves #958.
Testing steps