In one of my map addons, I did a work around like this:
Lua Code:
-- If you add quest tracker entries, these are tainted until the next /reload.
-- QuestMapFrame_OpenToQuestDetails is called when clicking on a quest tracker entry
-- or when clicking on the ShowMapButton of QuestLogPopupDetailFrame.
-- During combat, QuestMapFrame_OpenToQuestDetails does not manage
-- to bring up WorldMapFrame and hide EncounterJournal and QuestLogPopupDetailFrame.
local OriginalQuestMapFrame_OpenToQuestDetails = QuestMapFrame_OpenToQuestDetails
QuestMapFrame_OpenToQuestDetails = function(...)
if InCombatLockdown() then
if not WorldMapFrame:IsShown() then
WorldMapFrame:Show()
else
WorldMapFrame:Raise()
end
end
OriginalQuestMapFrame_OpenToQuestDetails(...)
end
-- QuestLogPopupDetailFrame_Show is called when you right click
-- on a quest tracker entry and select "Open Quest Details".
-- During combat, QuestLogPopupDetailFrame_Show does not manage to
-- bring up QuestLogPopupDetailFrame, so we have to show it manually.
local OriginalQuestLogPopupDetailFrame_Show = QuestLogPopupDetailFrame_Show
QuestLogPopupDetailFrame_Show = function(...)
if InCombatLockdown() then
if not QuestLogPopupDetailFrame:IsShown() then
QuestLogPopupDetailFrame:Show()
else
-- If QuestLogPopupDetailFrame is already shown for the clicked quest,
-- it should be closed, which QuestLogPopupDetailFrame_Show with
-- its HideUIPanel() also cannot do during combat.
local questLogIndex = ...
local questID = C_QuestLog.GetQuestIDForLogIndex(questLogIndex)
if QuestLogPopupDetailFrame.questID == questID then
QuestLogPopupDetailFrame:Hide()
return
else
QuestLogPopupDetailFrame:Raise()
end
end
end
OriginalQuestLogPopupDetailFrame_Show(...)
end