A wrote a custom TV that allows a user to select an image from a Gallery album. You click a button, and it pops up a modified version of the Gallery Browser (I disabled a few features) so the user can select an image. It's all been working perfectly until a user attempted to drag the browser off-screen on to her other monitor. It won't come back. Not on that browser, not on her computer, not on any computer. And the problem isn't tied to the TV value in any way, it's broken for her on all resources, and the pop-up works fine for other accounts with identical permissions.
I've logged into her account and confirmed that the browser is gone JUST for her. If I display an alert showing its "x" position, it's at -1643. I can edit GAL.BrowserWindow in the original Gallery code to reset that to zero so the window comes back on screen, but for some reason I can't get that to work in my custom class (which is a simple Ext.extend of the original). Setting the x and y properties on load has no effect.
I don't want to edit the original code, obviously, so I'm going to optimistically assume I'll figure out the right place to put the code in my own file eventually, but where in the world is this position being stored in the first place? When she reported the problem I expected it to be browser-specific, not somehow tied to her account. Even for a single account, if you did want to save the user's preferred position, that position would likely be different on a small laptop screen vs a huge monitor.
Another thing I don't get is if it is saving the last position, why it didn't save the position when I directly edited the Gallery code to move it to x=0. As soon as I took that out, it popped back over to -1643.
This is making my brain hurt. Revo 2.2.4-pl, Gallery 1.5.2.
If there's a better way to do it, I'll find it.
Well, I at least found out where the number is coming from. It's showing up in the generated source code as part of MODx.defaultState, which it looks like is being set in modmanagercontroller.class.php.
Don't suppose anyone here is familiar enough with registry.modRegistry to save the rest of my afternoon? I haven't poked around this part of the code before.
And is it possible for the position of this window NOT to be saved there?
If there's a better way to do it, I'll find it.