Moving and Resizing Bug with Firefox ESR

I am using Firefox 91.6.0esr due to work requirement.

I have a window moving and resizing macro for my Ultrawide:
image

This macro is working with Safari, Excel and Fantastical. In fact, I believe every other apps/windows in the Mac works. But, somehow, it requires two presses of the macro trigger key to work on Firefox. The first trigger will resize. I need to press the trigger another time to move it to the correct position. Does Firefox window behaves differently? It's not a big deal, to be honest, since it works for every other app but it can be annoying when I want to move a Firefox window to one side of the screen for references and it behaves differently.

Although we both want the best solution here, we might settle for this one: you could add an IF statement to check if the active application is Firefox, and if it is, just repeat the command.

Oh yes.. that's a very simple workaround then. Thank you.

You could also try AppleScript UI-Scripting, and see if it works better than Keyboard Maestro's native window actions.

tell application "System Events"
   tell application process "Firefox"
      tell front window
         set its position to {63, 23}
         set its size to {1312, 875}
      end tell
   end tell
end tell

You can get those values from an existing window if you need help figuring out what is what.

tell application "System Events"
   tell application process "Firefox"
      tell front window
         set winPosition to its position
         set winSize to its size
      end tell
   end tell
end tell

return {winPosition, winSize}

Run from Apple's Script Editor.app or better yet Script Debugger (pro or lite).

-Chris

1 Like

Thank you Chris. At this moment, I am using Stream Deck buttons to move windows around the Ultrawide:

So, I don't have a lot of buttons left nor the muscle memory to remember additional keystroke just for Firefox. I am planning to use @Sleepy suggestion to put an IF ELSE statement into this macro so that it treats FF differently. That way, it's still the same macro/button to serve all other windows.

Sometimes kludges work fine, as this case suggests.

1 Like

Test from the Script Editor.

If it works well then you can branch your macros to run an Execute an AppleScript action for Firefox.

-Chris

1 Like