-
Notifications
You must be signed in to change notification settings - Fork 48
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
Styled YouTube subtitles: words won't get selected wholly across spans #535
Comments
Hi! Thank you for filing this issue! I had a look into it and I suspect the problem is because you have You can reproduce this with the following minimal test case: <p><ruby><span>疲</span><rt>つか</rt></ruby><span style="display: inline-block">れた</span></p> Is this HTML something that you are producing or something YouTube is producing? |
YouTube is. <?xml version="1.0" encoding="utf-8" ?><timedtext format="3">
<head>
<pen id="1" rb="1" /> <!-- so that <s p="1"> will work like html's <rb> -->
<pen id="2" rb="2" /> <!-- so that <s p="2"> will work like <rp> -->
<pen id="4" rb="4" /> <!-- so that <s p="4"> will work like <rt> -->
<wp id="0" ap="7" ah="50" av="75" /> <!-- in order to raise subtitles higher -->
</head>
<body>
...
<p wp="0" t="153340" d="5689"><s p="1">夜</s><s p="2">(</s><s p="4">よる</s><s p="2">)</s>に <s p="1">踊</s><s p="2">(</s><s p="4">おど</s><s p="2">)</s>り<s p="1">疲</s><s p="2">(</s><s p="4">つか</s><s p="2">)</s>れて</p>
...
</body>
</timedtext> Nothing fancy. The spans themselves are just minimal ones to make a rubied text happen.
Is it for something important? If so, would it make sense to at least add an option to disable that behavior? |
Thanks! I'm quite happy to change Rikaichamp to traverse |
If a clickable/machine-readable link is absolutely necessary, here's a second example (which is made by some other person): https://youtu.be/f5f5383Pm00 |
I'm sorry, I completely overlooked that you wrote in your previous comment that I can reproduce it from the URL in the screenshot! You're right, I've been able to reproduce it using that link. It should be fixed in the next release, hopefully. |
I made simplest possible furigana-containing YouTube subtitles.
When I hover over, let's say, the word
疲れて
, then only疲
gets selected,れて
doesn't. So I can't appreciate the rikaichamp deconjugation feature for this kind of words.But if I go to Firefox Inspector and remove the
<span>
tags around both<ruby>...</ruby>
andれて
then the selection starts working properly. Yet if I just replace<ruby>...</ruby>
with疲
, it doesn't fix that. So I believe the bug all has to do with spans and not ruby tags.The text was updated successfully, but these errors were encountered: