I've created an example to isolate the problem into a single AddOn:
toc Code:
## Interface: 70000
## Title: SCROLL FRAME TEST
main.lua
Lua Code:
-- main.lua
local function OnMouseWheel(self, step)
local value = self:GetVerticalScroll() - (step * 20);
if (value < 0) then
value = 0;
elseif (value > self:GetVerticalScrollRange()) then
value = self:GetVerticalScrollRange();
end
self:SetVerticalScroll(value);
end
local outer = CreateFrame("ScrollFrame", "SCROLL_FRAME_TEST", UIParent);
outer:SetPoint("CENTER");
outer:SetSize(200, 400);
outer:SetScript("OnMouseWheel", OnMouseWheel);
outer.child = CreateFrame("Frame", nil, outer);
outer.child:SetSize(200, 800);
outer:SetScrollChild(outer.child);
outer.child.bg = outer.child:CreateTexture(nil, "BACKGROUND");
outer.child.bg:SetAllPoints(true);
outer.child.bg:SetColorTexture(math.random(), math.random(), math.random());
local inner = CreateFrame("ScrollFrame", nil, outer.child);
inner:SetPoint("TOPLEFT", 20, -50);
inner:SetSize(150, 200);
inner:SetScript("OnMouseWheel", OnMouseWheel);
inner.child = CreateFrame("Frame", nil, inner);
inner.child:SetSize(150, 800);
inner:SetScrollChild(inner.child);
inner.child.bg = inner.child:CreateTexture(nil, "BACKGROUND");
inner.child.bg:SetAllPoints(true);
inner.child.bg:SetColorTexture(math.random(), math.random(), math.random());
inner.child.content = inner.child:CreateFontString(nil, "OVERLAY", "GameFontNormal");
inner.child.content:SetText("CENTER");
inner.child.content:SetPoint("CENTER");
The child comes out of the ScrollFrame mask once the inner ScrollFrame cannot be seen.