Skip to content

Commit

Permalink
REGRESSION(266664@main): Reversion bubble does not appear when marker…
Browse files Browse the repository at this point in the history
… placed at end of autocorrected word

https://bugs.webkit.org/show_bug.cgi?id=259949

Reviewed by Megan Gardner.

The bug was caused by clearing of m_rangeWithAlternative in startAlternativeTextUITimer.
Just clear the timer instead.

* Source/WebCore/editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::startAlternativeTextUITimer):

Canonical link: https://commits.webkit.org/266707@main
  • Loading branch information
rniwa committed Aug 9, 2023
1 parent 44ab01d commit acd6c7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/WebCore/editing/AlternativeTextController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ void AlternativeTextController::startAlternativeTextUITimer(AlternativeTextType
if (type == AlternativeTextType::Correction)
m_rangeWithAlternative = std::nullopt;
m_type = type;
stopAlternativeTextUITimer();
if (m_timer)
m_document.eventLoop().cancelScheduledTask(m_timer);
m_timer = m_document.eventLoop().scheduleTask(correctionPanelTimerInterval, TaskSource::UserInteraction, [weakThis = WeakPtr { *this }] {
if (!weakThis)
return;
Expand Down

0 comments on commit acd6c7c

Please sign in to comment.