Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c4d5c30d6834f6f0a5dde37743a0e50447a31fb6
      
https://github.com/WebKit/WebKit/commit/c4d5c30d6834f6f0a5dde37743a0e50447a31fb6
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2026-10-12 (Mon, 12 Oct 2026)

  Changed paths:
    M Source/WebCore/editing/Editor.cpp
    M Source/WebCore/editing/Editor.h
    M Source/WebCore/page/ContextMenuController.cpp
    M Source/WebCore/page/ContextMenuController.h
    M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift

  Log Message:
  -----------
  [AppKit Gestures] Presenting context menu around typo does not present 
spelling/guess options
https://bugs.webkit.org/show_bug.cgi?id=326976
rdar://188108927

Reviewed by Wenson Hsieh.

Context menus presented in certain flows leave the selection alone, but
the context menu's spelling items are built from the selection. As such,
some menus presented at an insertion point never offer spelling/grammar
suggestions.

In this patch, we instead build these items for the word at the insertion
point that other context menu presnting flows would have selected, and
make them act on that word without changing the selection.

Tests: 
AppKitGesturesTests.Basic.clickingTwiceAtCaretInMisspelledWordOpensContextMenuWithSpellingItems
       
AppKitGesturesTests.Basic.choosingLearnSpellingAtCaretLearnsMisspelledWord
       
AppKitGesturesTests.Basic.choosingSpellingGuessAtCaretReplacesMisspelledWord

Canonical link: https://commits.webkit.org/323472@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to