Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Keyboard Shortcut to Make Text Bold Opens Bookmarks on Firefox

Open thekief opened this issue 1 year ago • 10 comments

Description:

Steps to reproduce:

  1. Open RocketChat in Firefox
  2. Press ctrl + b

Expected behavior:

The asteriks to make text bold are placed.

Actual behavior:

The asteriks to make text bold are placed and the bookmark view is opened.

Server Setup Information:

  • Version of Rocket.Chat Server: 6.10
  • License Type: n/a
  • Number of Users: n/a
  • Operating System: n/a
  • Deployment Method: n/a
  • Number of Running Instances: n/a
  • DB Replicaset Oplog: n/a
  • NodeJS Version: n/a
  • MongoDB Version: n/a

Client Setup Information

  • Desktop App or Browser Version: 6.10
  • Operating System: Linux (Endeavour OS)

Additional context

Relevant logs:

thekief avatar Nov 21 '24 18:11 thekief

No, the issue is not with Firefox but with RocketChat. Every other application that uses ctrl + b to make text bold seems to work.

In addition, it would be very, very odd that only this very key sequence is affected. ctrl + k is used by Firefox as well as RocketChat as a shortcut for the search. This combination is properly caught by RocketChat, not opening the search bar of Firefox

thekief avatar Nov 24 '24 22:11 thekief

This is likely due to the Firefox shortcut for bookmark which is Ctrl+b

It doesn't affect Chrome/ium and likely not on other apps too.

The question then is do people want it overridden?

This will need to be considered by the team.

reetp avatar Dec 03 '24 11:12 reetp

Referred to the team for comment.

reetp avatar Dec 03 '24 11:12 reetp

@reetp please re-read my comment https://github.com/RocketChat/Rocket.Chat/issues/34021#issuecomment-2496281317 .

The issue with ctrl+b solely exists with RocketChat in combination with Firefox. Every other web app supporting formatting seems to work fine, just not RocketChat. In addition, other shortcuts shared by Firefox and RocketChat seem to be properly handled, e.g. ctrl + k.

It could be a underyling bug with Firefox, but in this case I would go with the flow and handle it as every other project does.

I would be very in favour for the linked PR to be merged :)

thekief avatar Dec 04 '24 14:12 thekief

please re-read my comment

I did.

I understand.

But essentially it is down to FF using Ctrl + b whereas other (browser) apps don't appear to.

Hence it appears in FF, and not other browsers. So FF specific.

Remember, if it is blanket disabled it's really a workaround rather than a fix and it may suit you, but not others.

Personally I've never used it in FF beyond bookmarks - the expected behaviour - and checking with my users, no one else does either. I'd be wondering what happened if that was disabled....

In any event, see my previous. This has been referred to the team. You'll have to see what they say but that might take some time.

reetp avatar Dec 04 '24 14:12 reetp

Thank you for your answer. Regarding this "special case", do you really do not need event.preventDefault(); for key shortcuts, such as ctrl + k?

thekief avatar Dec 05 '24 08:12 thekief

Thank you for your answer. Regarding this "special case", do you really do not need event.preventDefault(); for key shortcuts, such as ctrl + k?

In essence, nope. But that's irrelevant.

I have already told you I have referred this to the team for comment.

You will have to wait and see what they say, or build your own version with whatever fix you want.

reetp avatar Dec 05 '24 09:12 reetp

Thanks for sticking with me. The context of my question was that I'm thinking about potentially opening a bug ticket in Mozilla's Bugzilla.

thekief avatar Dec 05 '24 10:12 thekief

Worth a try!

I don't know what the outcome will be here, but it is in the right hands.

N.B. nothing moves fast at this place so the wait may be long.

reetp avatar Dec 05 '24 14:12 reetp