TideSDK - Set child window always to topMost of main window - javascript

I have a project that consists in creating an app that works on top of other apps. My app stays always on top and allows transparency for interaction with apps bellow. All is going ok, I've applied topMost (true) to the app and its ok.
Because I ways having problems with getting window dialogs (alert but not prompt nor confirm) to stay on top and void interaction with my main window until it gets closed - https://groups.google.com/forum/#!topic/tidesdk/yYkEcC6X5y0 - I had to create my own dialog windows. I managed to get this one going by creating a child window, setting its property topMost to true and always refocusing the dialog whenever there was an atemp to activate/focus main window.
My problem comes when another window needs to be created to act like a Photoshop floating tools window. This window looses its focus and gets beneath main window during itereaction with main app and dialogs. I need this window to always stay on top of main window and under dialog tools so that UX gets correct.
I've managed to get the window to stay on top, but I'm playing arround with focus and unfocus for all windows and it is getting messy.
Does anyone no how can I get to set the order from a main window and all its child windows?
Thanks,
Peter

I've managed to solve this one quickly, so here it is:
When creating all windows (main, tools and dialogs) I only use the topMost param property on method createWindow
( https://github.com/TideSDK/TideSDK-doc/tree/master/source/guides/getting_started#window-elements ).
On main window I only use the tiapp.xml properties
(https://github.com/TideSDK/TideSDK-doc/tree/master/source/guides/getting_started#tiappxml-configuration).
It is only with the tools window that I invoke method setTopMost (true) at window init (one time execution). This way the window will always stay on top of all.
Finally for the dialogs I force focus whenever user tries to interact with tools or main window.
so order goes like this (top to bottom)
dialog ( xml property topMost and always forcing focus )
tools ( xml property topMost and setTopMost method on init )
window ( xml property topMost )

Turns out the previous solution wasn't correctly tested. Main app did not have the tiapp.xml defining top-most to true. So I guess I need to take a deeper look into this issue
:(

Related

Can current window gets moved or resized?

I am somehow familiar with javascript and I am trying to learn all the properties and methods of window, document etc objects.My question is related with methods like resizeBy,resizeTo,moveTo,moveBy.I am seeing all the methods in action and all they do is effecting new window opened based on examples online.Is it possible that this methods effect the default window opened in a tab without trying to do in other windows opened?
According to https://developer.mozilla.org/en-US/docs/Web/API/Window:
In a tabbed browser, each tab is represented by its own Window object; the global window seen by JavaScript code running within a given tab always represents the tab in which the code is running.
So, yes.

Extjs 6 - Can't make alwaysOnTop work correctly

What is the proper way to us the "alwaysOnTop" property for components or windows?
If I define a window - say a toolbar - and set alwaysOnTop: true, shouldn't that keep other windows from obscuring it?
Do windows with this property need to be registered with Ext.WindowManager?
Long story, I'm using the Desktop code (see here: https://examples.sencha.com/extjs/6....top/index.html). You will notice that you can move the windows over the bottom toolbar - this should not really happen.
Adding alwaysOnTop: true to that taskbar code alone has no effect but doing subsequently doing this does:
Ext.WindowManager.register(taskbar)
Problem is that win.toFront() no longer seems to work for other windows on the desktop. Such that if window A overlaps window B, B.toFront() will have no effect.
So, the question is, what is the proper way to use alwaysOnTop for specific items yet have other windows behave as expected?
Have you checked below link? I think we have to apply other methods like this for achieving the output.
Always on top
Ok, so you still need to register the windows you want 'alwaysOnTop'
but it turns out the reason why the window will not come to the front is that the ZIndexManager will not promote a window up if there is any window that has been register as "alwaysOnTop".
The function bringToTop() contains the following code:
if (!comp || zIndexStack.find('alwaysOnTop', true)){
return false;
}
This will keep the window in question from moving up in the stack.
removing the alwaysOnTop comparison seems to solved my issue. When setActiveCounter is executed on your component, that will trigger a call to resort the collection and place windows on that have 'alwaysOnTop" set on the top of the stack, followed by the one in question.
The result of this is that the task bar at the bottom of the desktop will always stay on top, and your floating windows promotion/demotion will behave as they should.

How to force jqxWindow to be topmost

I use js jqxWindow on my web page. They are frames allowing to be moved, resized, and got focus.
But each time I select a jqxWindow, this becomes the topmost one.
I need to kept some other windows topmost. How to do that ?
I believe that the only solution for this is to apply bringToFront in the opening code of the other windows to the window, which shall always be on top.

JavaScript window options

I'm looking to create a "pop-up" window that simply displays text within the window without the browser's signature. When I create a window simply by using the window.open command, the Chrome symbol and address bar is displayed.
Is there a way to get rid of this?
Or is there a smarter way of doing this?
Also, with that being said, I want this window to stay on top of all other windows being displayed. That is, I want it to essentially be running on top of a window even though I may be clicking on a full screen window behind it.
No, this is intentionally made not possible (at least in Chrome) because it could be used to confuse the user to think that a browser window is a window for another program.
Google Chrome window.open height includes URL bar

Moving XUL window

I'm working on an app, which is based on Firefox and what I need to build is an in-app password manager. I'm planning to populate it once and hide it from view outside of the window frame, bringing it in-frame when it is needed. Now, I have read about the rules applied to moveTo, namely
"You can't move a window or tab that wasn’t created by window.open.
You can't move a window or tab when it’s in a window with more than one tab."
I was wondering if there are any exceptions to that rule? I have full access to chrome, so I was wondering if there's some more low-level way to achieve the moveTo form there?
Thanks a lot!
The restrictions of window.moveTo() don't apply to code running with system privileges. I just tried typing top.moveTo(-1000, 0) into the Error Console - it moved the window off-screen, something that unprivileged code isn't allowed to do. Still, opening the window off-screen is not possible as far as I know (you can however move it in a load event handler, when the window is still invisible). Also, the task manager still shows that window - it is possible to Alt-Tab to it, then press Alt-Space and choose "Move" from that system menu (that's on Windows).

Categories

Resources