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
Fix nick change on Safari for Mac and iOS #1568
Conversation
client/css/style.css
Outdated
@@ -1496,6 +1496,8 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */ | |||
|
|||
[contenteditable]:focus { | |||
outline: none; | |||
-webkit-user-select: text; | |||
user-select: text; |
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.
If this is the right fix, you'll want to use the full set of prefixes we use for example here:
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
While you're at it, could you add cursor: text;
please? Thanks!
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 didn't include those because as far as I can tell, only WebKit/Safari uses "none" as its default and the other browsers worked as expected. For certainty's sake, we can do that 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.
Yeah, let's be consistent, and whenever we tackle #1551, we'll let the auto-prefixer get on with it :)
Thanks for this, @Gilles123! I know this is broken in v2.4.0 as well, but I'm marking this for v2.5.0 milestone, because fix seems easy, and the bug is bad enough :) @MaxLeiter, could you give this a go please? |
Shouldn't this be set on |
It works either way. I changed it to be without focus. |
Approved, but can you squash your commits? |
Works for me 👍 |
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.
Tested 👌 on Safari, great job @Gilles123!
One comment before we get this in :)
client/css/style.css
Outdated
@@ -1498,6 +1498,14 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */ | |||
outline: none; | |||
} | |||
|
|||
[contenteditable] { |
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.
Actually, make this [contenteditable="true"]
so it's only selectable + correct cursor in edit mode.
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 don't think that's necessary in lounge?
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.
Why not? That's what we do everywhere else in the app except messages, i.e. UI not selectable. With this addition, it stays like that, except when the nick is being edited, when it can be selected and have the text cursor. Makes sense?
It is currently impossible to edit the nick text after pressing the edit button on Safari for iOS and Mac because user-select is set to None on Safari by default. This fixes that issue. Tested that it is not editable when it shouldn't be and that it doesn't break anything on Chrome or Firefox.
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.
@Gilles123, I just made the suggested change + squashed commits as we would like to draft a pre-release right now. Happy to circle back with you to share what I did to get there if you want :)
Either way, great stuff and thanks for catching this!
(Hey @Gilles123, do you happen to have a Twitter account to give you a shout-out after we release v2.5.0? 🙂) |
Hey @Gilles123, we have free sticker packs for our contributors now! |
It is currently impossible to edit the nick text after pressing the edit button on Safari for iOS and Mac because user-select is set to None on Safari by default. This fixes that issue. Tested that it is not editable when it shouldn't be and that it doesn't break anything on Chrome or Firefox.