stable

Clone or download

Read-only

fix: unable to set text style in Chrome

part of story #38627: Choice of a new Rich Text Editor As it turns out, click handlers set on HTMLOptionElements will never be called in Chrome based browsers. Since the options in the text-style selectbox listen for clicks, then the text styles are never applied. Let's put a onchange handler on the select element instead. How to test: --> Both in Chrome and Firefox, setting text style should work as expected. Change-Id: I643773ed77a34209d0db7977981fb458fb24ff64

Modified Files

Name
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/apply-text-style.test.ts +141 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/apply-text-style.ts +77 −0 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/heading-option-template.test.ts +4 −31 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/heading-option-template.ts +22 −18 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/plain-text-option-template.test.ts +1 −30 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/plain-text-option-template.ts +6 −12 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/preformatted-text-option-template.test.ts +1 −30 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/preformatted-text-option-template.ts +6 −12 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/styles-option-template.ts +4 −4 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/text-style/text-style.ts +22 −7 Go to diff View file