View Single Post
06-17-16, 04:26 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
I hate that bug so much. It makes me reluctant to use the interface options panel in my addons.

However, I can confirm it's tainting even without any addons. That's a genuine bug and there may be hope to get it fixed at last. I recommend posting this (or getting this thread moved) to the bug forum, and maybe post on the official legion bug forum too.

Anyway this fix appears to work in Legion still:
Code:
-- Remove the cancel button
InterfaceOptionsFrameCancel:Hide()
InterfaceOptionsFrameOkay:SetAllPoints(InterfaceOptionsFrameCancel)

-- Make clicking cancel the same as clicking okay
InterfaceOptionsFrameCancel:SetScript("OnClick", function()
    InterfaceOptionsFrameOkay:Click()
end)
It removes the Cancel button and instead treats Cancel as Okay.

The OnClick script handler is there (even with the button removed) because ToggleGameMenu() does a InterfaceOptionsFrameCancel:Click(). So hitting ESC to close options will click Okay instead of Cancel.