User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7 Steps to reproduce: 1) Open Firefox 9 on OS X (tested against 10.7). 2) Navigate to about:blank, then minimize Firefox. 3) Run the following AppleScript: set titleIdentifier to "Firefox" tell application "Firefox" repeat with w in windows if name of w contains titleIdentifier then set visible of w to true set index of w to 1 return end if end repeat end tell error number -128 Actual results: A grey square appears in the top left of OS X desktop, outside of the Firefox window. I have not been able to get the square to go away without quitting Firefox. Expected results: There should be no weird square there
To give some context about this AppleScript: The purpose is to bring Firefox into view if it's minimized, behind a window, or on another OS X space. There is a little extra AppleScript required to handle all the cases, but I've left only the essential AppleScript that reproduces the bug, in the bug report.
I was able to reproduce this but am not sure if it is a Firefox bug or a problem with your AppleScript. JasonZ, if you are still using your script, did you ever get it to work correctly?
I was able to work around the issue with the following script. however the script has a limitation of not showing firefox if the user is in another OS X space. tell application "Firefox" repeat with w in windows if name of w starts with titleIdentifier then set visible of w to true activate return end if end repeat end tell error number -128
Hi, I, also, managed to reproduce the issue with the latest release(43.0.4) and the latest Nightly(46.0a1) builds, using the 1st script. User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:43.0) Gecko/20100101 Firefox/43.0 Build ID: 20160105164030 User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:46.0) Gecko/20100101 Firefox/46.0 Build ID: 20160114060719 However, with the 2nd script (comment 4) I can restore Nightly(46.0a1) without problems, but when I try to restore Firefox(43.0.4) an error is displayed: (error "User canceled." number -128 from «script» to item). Also (set titleIdentifier to "Firefox") must be defined at the beginning of the 2nd script, if not an error is displayed with the message: titleIdentifier is not defined. I can launch both browsers (if they are closed) using the 2nd script without problems, only Firefox cannot be restored when it is minimized. Perhaps there's someone with extensive knowledge on this area that might be able to help here. Thank you, Vlad
Component: Untriaged → Shell Integration
Version: 9 Branch → Trunk
You need to log in before you can comment on or make changes to this bug.