Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

"Lock" window position...

Featured Replies

I'm pretty sure the answer is no, but is there a way to capture the position of a window so that I can do a script that will snap it back to its original position when a user moves it? 

As far as I know, there are no script triggers that can run when a window is moved, just changed (dimension, mode, etc.)

This is the first I’ve heard such a request. What’s the use case? Why do you care that the user moved the window?

  • Author

Good question... I have a window acting as a kind of launcher with buttons. It's only 100 pixels wide. Some of the buttons have popup windows that in turn open a card window that is much larger.  Since a new card window is based on the parent, I've done some convoluted math to make sure it appears on the screen near the main window. The problem is, if the user moves the main window, the card may end up off the screen with no way to interact with it. That's why I want to move the main window back to its original location if they move it.

I have set a script step that moves the main window when the card window is opened, but that doesn't prevent them from moving it after the card appears.

21 hours ago, vinnygi said:

I've done some convoluted math to make sure it appears on the screen near the main window. The problem is, if the user moves the main window, the card may end up off the screen with no way to interact with it.

Can't you use some more "convoluted math" to prevent this from happening?

 

Spawn a regular window off-screen. Pop the card window from that. Then the user can't move. It will need to be based on it's own file, or the user won't be able to do anything else with any window.

Generally, I'm not a fan of forcing things on the user, unless absolutely necessary. So you will need to consider if that's really necessary vs just having a floating window they can place where they want.

You may also need to do some dancing to make sure scripts don't inadvertently take over that launcher window. A separate file can go a long way in making that management easier.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.