Focus and blur with popups
March 19th, 2007 — 10:07 am —I know, I know, as soon as you see the word popups you think the worst. But they do serve a purpose, especially in web applications. We only use one popup and it’s really out of necessity. Our popup is the main content editing window. I created it this way because I want to see the page I’m working on while I edit the contents for the page. In this case, the popup is a good choice.
In fact, just recently (with the v0.3.2 release) we added a more dynamic preview to the system. Now, when you preview your content in the editing window (popup) it also updates the block on the actual page, thus providing a much more accurate representation of the content.
However, one of the minor annoyances in previous versions was that clicking the edit icon would not bring the popup into focus if it was already opened. This used to work with a simple this.focus() call in onload, but somewhere it stopped working.
Luckily, there is a solution (it’s working for me, at least): you have to also blur the parent window:
this.focus(); this.opener.blur();
So, if you are having trouble with popups, try using the combination of focus and blur.
About slate
slate is a content management system (CMS) developed using Ruby on Rails focused on rapid production of traditional websites created by WVU Web Services. Read more about why we created slate and a longer list of features of slate. You can also check out a list of sites using slate. If you have questions or comments let us know but if it's a question about open sourcing slate have a look at this article first.Archives
Recent articles
- No Wonder Rails Is Default in Mac OS X Server...
- Good News: An Open Sourced slate Is Coming
- The WVU Open Source License
- Implementation idea: .do templates
- Keeping slate Humming - Part 1
- Campfire for Design & Keeping Your Tag Cloud Running
- Custom configuration settings made easy
- HOW-TO: Add a Gallery to Your Site
- JSONRequest.post Example
- Miscellaneous
Articles
Add comment
You are adding a new comment