Fix/aut 3961/taofurigana ruby rt not focused #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to https://oat-sa.atlassian.net/browse/AUT-3961
Use with:
Deployed on:
Issue
In Chrome, in Authoring add a ruby tag -->
<rt>
is not focused automatically, so author can't type his furigana. If you press "arrow-right" to move cursor, then it's focused.Fine in Firefox.
Probably, the cause of the issue is not a change in our code, but a change of native browser behavior for
contenteditable
in newer versions.Fixed by moving cursor position one symbol after: ckeditor docs.
TODO:
Other issues:
I'm pretty sure these issues existed before too (= always). Still, let's at least take a look.
(<rt> </rt>
) is never removed, even after user enters his furigana, it stays in itemDataCKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE
instead,<rt>
is fine then, but this sequence is sometimes appended after ruby?\200B
(zero-width-space) instead, or even trim it in item-runner?blur
for example? Iftaofurigana
was an inline widget withdowncast/upcast
converters, it would have been possible. But it's a native html tag, so not sure.
placeholder by pressingDel/Backspace
, and don't enter any other text, you can no longer return and edit your ruby, even though it stays in the markup and itemData.<rb>
, away from where the actual typing inside<rt>
happens): browsercontentediatble
issue, try in playground: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable :<div contenteditable="true"><p><ruby><rb>とても長い言葉</rb><rt> </rt></ruby>で話す<ruby><rb>のわ楽しい</rb><rt>たのしい</rt></ruby>かもしれない</p></div>
. Check ruby-align.