I am using #material-ui with react. I've got the following problem:
With the keyboard, open the context menu, select "Assignee details" or "Requester details"
Close the dialog. When you tab again, the focus is now back at the top of the page, it should stay on the menu. How can I achieve this behavior?
https://codesandbox.io/s/hardcore-breeze-s4mkez?file=/src/Test.js
You can save the current focused element (you can get it with document.activeElement) and after closing the menu, set focus to the desired element with element.focus()
Related
When I click on the ShowButton with the wheel (I want to open in a new tab), the tab opens, but without content.
If I open by clicking the left mouse button - it opens in the same tab and everything is correct, if I click on the wheel, it opens in a new tab (as target=_blank) and in this case a blank page is displayed, without content. How can I fix it?
Simple ShowButton from React-admin
Actual
Expected
I have a popup opening next to the textbox. When I click on the tab key from the textbox it should be navigated to the close icon of the popup (top right corner) and when I click on the close button from the popup, focus should be set to the next control in the form and popup should be closed.
Here is the fiddle
So in fiddle, when I click on the tab from business structure drop down, focus should be set to the close icon(top right corner) and on each next tab it should be move to the next control inside the popup and from close button it focus should be on type dropdown
Its all about the method how to grab a component, which seems to have no connection to another component.
Here the solution is, that you set an alignTarget by using showBy.
Focus:
focus: function(field){
field.popup= Ext.create('tooltip' );
field.popup.showBy(field.el, 'l-r',[10,0]);
},
Listener:
listeners: {
'destroy' : function(win,ev) {
const field = win.alignTargetFly,
next = field.next().component;
next.focus();
}
},
By the pure number of questions you are asking here for the same component (3 or 4 so far), it might be better to grab professional help. Just ask someone to build a component by an image and a short description. This description could be instantly part of your documentation too. This might cost a one day of work.
From what I see so far I would do a custom component, that includes a field.base with the popup. This can be added as a single component to your library and be included instead of your field.
At the end this will be way cleaner in your codebase than what you are currently doing. Just for an example: Always keep the same order for components. After the extend line should be the xtype ... At the end it is easer to read for everyone.
I want to remove the close button from the context-sensitive menu that appears when I right click a record in list view.
I found instructions how to do it for web forms but I am using Winforms.
I don't want to deactivate the controller because I still need the close button on the main toolbar.
I am wondering whether to move the barContainerClose from the barContainerView
In the template
I've got a WPF form inside a window and a short series of events like this:
1) 1st form has series of selection buttons
2) Clicking a button brings up a progress bar window over the existing window
3) Progress window closes and 1st form switches to a new 2nd form using page navigation
The problem is that the 2nd form (and the entire window) no longer has any focus and what's really killing me is that the window is no longer getting OnKeyDown() calls (it's still the top winow). If I hit the tab key the first menu option is highlighted and the following key stroke will fire a OnKeyDown(). Also, if I alt-tab to another app and then alt-tab back to my window it will begin receiving OnKeyDown() again.
How do I figure out where the focus is after the dialog?
If you are using navigation then the focus will have switched to the Page that you have navigated to, assuming that it is Focusable.
You can check that by setting up a breakpoint in a Focused event handle for the Page.
Alternatively you can use an explicit control.SetFocus() in the page.Navigated handler.
I have a menu on my view. When focus on menu that time press F1. This F1 opens a browser page. Now close the browser. Focus not show on menu after closing the browser. Focus should still remain on menu but it comes after pressing tab.
That is just a nature of Windows focus system.
The focus is set to that "Window" at first. If you want to focus to menu, try GotFocus event on the root <Window>.