Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GM_config.open(); GM_config.close(); GM_config.open(); causes duplicate settings outside of iframe #9

Closed
Martii opened this issue Jul 27, 2010 · 17 comments

Comments

@Martii
Copy link
Collaborator

Martii commented Jul 27, 2010

...
GM_config.open();
GM_config.close();
GM_config.open();

causes duplicate settings outside of iframe.

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

This is an edge case scenario where overriding onClose with another GM_config.open(); to prevent Save button from closing block level element.

@sizzlemctwizzle
Copy link
Owner

I don't really understand this issue. This sounds like improper usage and doesn't seem like something we should worry about. I'll give you the opportunity to explain this further and what you think should be done before I decided to close this issue or not.

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

It's pretty simple... init... then open then close then open it again... the point that I've been typing all day is that Save closes the dialog... I'm almost ready to start a ticket on that one because the Cancel button should close and the save button is misleading by saving and closing.

@sizzlemctwizzle
Copy link
Owner

the save button is misleading by saving and closing.
Yes, I guess it doesn't make sense for the save button to also close the window. And even if people wanted that they could use the onSave callback function to close the window after saving. This is the root issue.

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

hmmm now I have to figure out why when I toggle open, close, open, close ... it stays closed forever :\ WIll look into my code a little deeper.

@sizzlemctwizzle
Copy link
Owner

I might know. It's probably an issue with toggling visibility.

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

I've confirmed that this issue is still happening. on open(), close(), open()

@sizzlemctwizzle
Copy link
Owner

I'm not. This commit might have fixed it 73ca6d4

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

hmmm nope...

I do an init

Then programatically do an open on a test case... and if the user selects something different that isn't compatible with it I close it... then if the user selects something that is compatible it never reshows.

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

Wait a second might be my conditional... ARGH about dain bread on this today.

Hmmm just removed my conditional altogether... still same issue... lemme do some more digging.
Grr edited my local copy not the installed copy eyeroll

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

Yah it's my conditional. We're okay on this issue. I'll just have to change some logic. Although this is weird... is open(); open(); open() supposed to create three total instances of GMC?

@sizzlemctwizzle
Copy link
Owner

is open(); open(); open() supposed to create three total instances of GMC?
No, definitely not. There is a check against this in open() for iframes. I just need another check for an html element.

Edit: fixed in this commit 8dbc9a6

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

Hmm this last commit busts my logic from prior commit which was working Ughh... digs for a while

There we go... GOT IT!

@sizzlemctwizzle
Copy link
Owner

busts my logic from prior commit
Sounds like your original solution was fragile. It wasn't that big of a change.

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

Considering the volatile nature of GMC right now... it's no wonder my code busted ;) I've had to make a lot of changes today and dummy me put it a working copy of an existing script instead of a Unit Test... although that's still hanging around. :)

@sizzlemctwizzle
Copy link
Owner

it's no wonder my code busted ;)

You're right, its pretty volatile right now. I've still gotta update my Facebook script in some places for the latest changes. For testing I actually symlink the @required file to the gm_config.js file in my git directory.

@Martii
Copy link
Collaborator Author

Martii commented Jul 27, 2010

I'm linking to the actual raw commit hash that way I know if there are any changes down the line it won't break my user.js

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants