68 - invisible/uneditable text in MultiLineEditBox
What steps will reproduce the problem?
1. Define a multi-line edit box in AceOptions ( {type="input",multiline=true} ) and set some text for it.
2. ???
3. Profit!!!
4. The text in the box is invisible and cannot be edited normally, but in some reports can still be copy-pasted in one or both directions.
This has been reported by at least 4 different users of two different addons (Auarcle and Pitbull), both of which use AceOptions to create the edit box in question. It doesn't happen to everyone, and I don't know of any reliable way to reproduce it, but here the various reports:
http://wow.curse.com/downloads/wow-addons/details/auracle.aspx#532517
http://www.wowace.com/addons/auracle/tickets/18-text-of-auras-field-not-visible-editable/
http://www.wowace.com/addons/pitbull4/tickets/438-dog-tag-text-edit-box-not-showing-text/
http://www.wowace.com/addons/pitbull4/tickets/566-lua-code-window-turns-blank/
I glanced at the MultiLineEditBox widget code and didn't see anything really obvious, but did notice some slightly odd trick played in :SetText() (with the comment "prevents OnTextChanged from firing" -- maybe this prevents the container from refreshing, so the text is there but never gets drawn?).
| User | When | Change |
|---|---|---|
| tsearP | Tue, 05 Jan 2010 11:13:29 | Changed status from Waiting to Replied |
| Nevcairiel | Sat, 05 Dec 2009 21:24:51 | Changed status from Accepted to Waiting |
| Nevcairiel | Sun, 25 Oct 2009 15:09:31 | Changed status from New to Accepted |
| taleden | Thu, 03 Sep 2009 19:35:01 | Create |
- 4 comments
- 4 comments
Facts
- Last updated on
- 10 Mar 2010
- Reported on
- 03 Sep 2009
- Status
- Replied - Someone has replied after waiting for more information.
- Type
- Defect - A shortcoming, fault, or imperfection
- Priority
- Medium - Normal priority.
- Component
- AceGUI-3.0
- #4
xilcoy Wed, 10 Mar 2010 18:35:21This was happening to me as well in r907 when I tried to use the MultiLineEditBox in my addon configuration dialog.
What I was seeing was that anytime the scrollFrame's OnShow event is called, the width of the scroll frame is zero. So when it calls FixSize the EditBox width also became zero, making the text invisible.
I was able to fix it by not calling FixSize on the OnShow event, or by skipping it if the size was zero.
Index: Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
===================================================================
--- Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua (revision 908)
+++ Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua (working copy)
@@ -240,11 +240,10 @@ do
local function FixSize()
--scrollchild:SetHeight(scrollframe:GetHeight())
--scrollchild:SetWidth(scrollframe:GetWidth())
editbox:SetWidth(scrollframe:GetWidth())
end
- scrollframe:SetScript("OnShow", FixSize)
scrollframe:SetScript("OnSizeChanged", FixSize)
editbox:SetScript("OnEscapePressed", editbox.ClearFocus
editbox:SetScript("OnTextChanged", function(_, ...)
scrollframe:UpdateScrollChildRect()
- #3
tsearP Tue, 05 Jan 2010 11:13:26The bug is still reproducable in Auracle. I'm using Ace 3 Release-r907 according to the curse updater.
- #2
Nevcairiel Sat, 05 Dec 2009 21:24:44Rumor has it that the fix to the ScrollFrame in r887 could've fixed this too, can someone that can easily reproduce this try to confirm?
- #1
Nevcairiel Sun, 25 Oct 2009 15:09:24The whole MLEB needs a rewrite, imho. Maybe i'll do that at some point, but not so soonish.