Skip to content

FB18171249: Button click cancellation in modal dialogs is broken #674

Open
@lemonmojo

Description

@lemonmojo

Submission Date

2025-06-18

Status

Open

Area

AppKit

Operating System Version

macOS 26 Beta 1

Type

Incorrect/Unexpected Behavior

Description

Button click cancellation (by dragging the mouse cursor off a button and releasing it outside the bounds of the button) is broken in modal dialogs in macOS 26 Beta 1.

This seems to only affect dialogs that are run modally. I cannot reproduce it with buttons that appear in windows that are not presented modally.

The easiest way to reproduce it is by spawning an NSAlert using the runModal function.

Here's a simple Swift AppKit example:

import Cocoa

@main
class AppDelegate: NSObject, NSApplicationDelegate {
    func applicationDidFinishLaunching(_ aNotification: Notification) {
        let alert = NSAlert()
        alert.messageText = "macOS 26 Beta 1 Button Click Cancellation in Modal Dialogs"
        alert.informativeText = "Button click cancellation in modal dialogs is broken."
        alert.addButton(withTitle: "OK")
        alert.runModal()
        
        print("After NSAlert.runModal")
    }
}

Actions taken to reproduce the problem:

  • Put the mouse cursor over the "OK" button.
  • Press the left mouse button and keep it held down.
  • Drag the mouse cursor off the "OK" button while keeping it held down.
  • Release the mouse button outside the bounds of the "OK" button.

What should happen:

  • The button should not respond to the click and the alert should remain visible.

What does happen instead:

  • The button responds to the click, the alert is dismissed and "After NSAlert.runModal" is printed to the console.
macOS26_Beta1_ModalDialogButtonClickCancellation.mov

Keywords

button, modal, dialog, cancellation

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