Skip to content

FB21932381 : pasting an Empty String ("") with NSPasteboard does not remove the selected text on Pages, Numbers and Keynote #767

@godbout

Description

@godbout

Submission Date

2026-02-11

Status

Open

Area

AppKit

Operating System Version

macOS 26.2

Type

Incorrect/Unexpected Behavior

Description

a clear description of the problem

pasting an empty ("") String on the current frontmost window erases the selection on any app except Pages, Numbers and Keynote, where it does nothing. this happens for both the old versions of iWorks, and the new versions.

a step-by-step set of instructions to reproduce the problem

i've made a project to showcase the issue: https://github.com/godbout/PagesNumbersKeynoteBugWhenPastingEmptyPasteboard

you can follow what needs to be done there, but i will repeat it here:

  1. download the source
  2. build the project
  3. give Accessibility Permissions to PagesNumbersKeynoteBugWhenPastingEmptyPasteboard
  4. click on the 'paste "" on selected text' button
  5. you then have 3 seconds to go select some text on an app
  6. after 3 seconds NSPasteboard will paste "" on the selected text
  7. you can see that the selected text is removed on any app (Safari, Xcode, third party apps) but it is not removed on Pages, Numbers and Keynote

i attached the video from the README here, showcasing the issue

what results you expected

i expected the selected text to be removed on Pages, Numbers and Keynote like it is on other apps, so that the API is consistent

what results you actually saw

the selected text is not removed when pasting "" through NSPasteboard on Pages, Numbers and Keynote

The version of Xcode you are using

Version 26.2 (17C52)

ScreenFlow.mp4

Keywords

nspasteboard, iworks, pages, numbers, keynote

Prerequisites

  • The title follows the format FB<number>: <title>
  • I will keep this issue updated with Apple's responses

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions