Open Bug 1500682 Opened 6 years ago Updated 2 years ago

Ctrl + U, Ctrl + B and Ctrl + I don't work as turrning "underline", "bold" nor "italic" styles

Categories

(Core :: DOM: Editor, defect, P2)

60 Branch
defect

Tracking

()

ASSIGNED

People

(Reporter: dev, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

(Keywords: parity-chrome, parity-edge, Whiteboard: [h2review-noted])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Steps to reproduce:

Please visit jsfiddle as per link below:
https://jsfiddle.net/j5Luogrt/

Press Ctrl + U in contenteditable pre in output pane.



Actual results:

Does not add/remove underline behavior as user would expect


Expected results:

Ctrl+U (underline), should work the same way as it works Ctrl+B (bold) or Ctrl+I (italic)
Component: Untriaged → Editor
Product: Firefox → Core
We don't assign command shotcut for cmd_bold, cmd_italic and cmd_underline.  Chrome assigns ctrl+U for underline (also, ctrl+B -> cmd+B and ctrl+I -> cmd+I)
Priority: -- → P5
I realized this bug at discussing InputEvent.inputType values. This might be important that if web apps don't add shortcut keys by themselves since they haven't tested with Firefox.
OS: Unspecified → All
Hardware: Unspecified → All
Summary: Ctrl + U doesn't behave as expected → Ctrl + U, Ctrl + B and Ctrl + I don't work as turrning "underline", "bold" nor "italic" styles
Status: UNCONFIRMED → NEW
Ever confirmed: true
Currently, if web apps want to ban those shortcutkey effects, they need to listen keydown event to call preventDefault(). If web apps have created ideally, this shouldn't cause compatible issue with Gecko since Gecko dispatches keydown event as almost same as other browsers especially for KeyA to KeyZ. If so, you won't see opening bookmarks in the sidebar when you press Ctrl+B in such web apps. I.e., you should see only "Firefox does nothing". On the other hand, after we implement "beforeinput" event, web apps can prevent the action with calling preventDefault() of "beforeinput" whose inputType is "formatBold", "formatItalic" and "formatUnderline". Even though Edge hasn't implemented InputEvent.inputType nor "beforeinput", we'd request to change web apps easier after implementing "beforeinput". So, I think that we should fix this after bug 970802.
Blocks: 970802
No longer blocks: 1609291
Priority: P5 → P2
Whiteboard: [h2review-noted]

beforeinput was shipped in 87. Perhaps, it's time to ship these shortcut keys.

Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.