Skip to content

Commit 2a2618c

Browse files
takaokoujiclaude
andcommitted
fix: disable furigana when switching to DNCL mode
When switching directly from furigana mode to DNCL mode, furigana annotations were not cleared because handleSelectDnclMode did not disable furigana. DNCL mode uses Japanese text, so furigana is redundant and should always be turned off. Fixes #514 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4c5811d commit 2a2618c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/scratch-gui/src/components/ruby-toolbar/ruby-toolbar.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ const RubyToolbar = props => {
8686

8787
const handleSelectDnclMode = useCallback(() => {
8888
if (props.onDismissBubble) props.onDismissBubble();
89-
// Switch to DNCL mode
89+
// Switch to DNCL mode (disable furigana since DNCL is already in Japanese)
9090
if (!props.dnclMode && props.onToggleDnclMode) props.onToggleDnclMode();
91+
if (props.furiganaEnabled && props.onToggleFurigana) props.onToggleFurigana();
9192
}, [props]);
9293
// === Smalruby: End of mode selection handlers ===
9394

0 commit comments

Comments
 (0)