icon menu - 1st icon always highlighted - monodevelop

I am creating icon menu (toolbar with icons) in gtk# and I do not know why my application always selects (highlights) first icon (every parameter is default). Is there a way to have all icons unhighlighted (highlight only when cursor moves over icon or user clicks on icon)?
Every answer will be very much appreciated.

It looks like it has keyboard focus. You probably want to give another widget the default focus.

Related

How to remove focus on dropdown button when you already moved mouse away from it?

When i click dropdown button and click it again for closing focus still remains. even when i move mouse away. How can focus removed for that case?
One possible solution is to remove the focus on the second click with the help of element.blur() - here are the related docs. You can add the class to the button on the first click and if the button has class (it will have on the second click) - just use blur.
But keep in mind, that some users want to interact with your site with the help of a keyboard, and removing focus will be annoying for them. Do you need focus to be visible on the button before opening the dropdown? Another possible solution is to remove :focus style from the element completely (outline: none), but it's not recommended.

Angular mouseover and leave not working MAT-MENU

I have a mat-sidenav and a list of mat-item and mat-menu. Then when I hover over of one of the items I want the menu to display. This part is working. But then when I move off of that menu or item and over a new item I want its menu to display.
https://stackblitz.com/edit/angular-xsscrm
I have included a stackblitz with a demo of the behavior.
What is wrong here I have both on enter and exit, but then when I leave a menu on to a new one, it doesnt open unless I click on it.
Thanks for the help
The issue here is that when a menu opens, it creates an overlay with a backdrop that overlaps all elements. This backdrop is causing the mouse events to not be 'seen' by the listening element until the overlay is dismissed via a mouse click. Luckily, the menu control has a flag to remove the backdrop; setting this to false fixes the issue you're seeing.
Side note: you have an *ngFor on the <mat-list> element, but I think you want to move it to the <mat-list-item> element instead because you want many list items, not many lists. Since you're using the local variable of *ngFor outside of the <mat-list-item>, you can create an <ng-container> element to house your *ngFor. See below stackblitz:
https://stackblitz.com/edit/angular-xsscrm-kx6jyd
Another side note: this behavior is similar to a tooltip. Perhaps that would be a better control for your use-case? https://material.angular.io/components/tooltip/overview

Hover at element which is not hoverred by mouse pointer at Google Chrome

I am doing an application which the user receives a list of items to choose. When the user moves the mouse, a DIV:Hover class works backgrounding the color of the div, and when he clicks at one div to select it, an ONCLICK function marks the clicked div and redirects to a website( _blank ). Perfect, but when you go back to this page, there is two div selected. The div user has clicked and another one. If the user moves the mouse, even if a little, the second div goes backs to normal.
What I want is to go back to the page and only the div clicked is marked.
It only happens on Google Chrome
Jsfiddle ---->
https://jsfiddle.net/u4ssywov/23/
Print Screen -->
http://postimg.org/image/ynr6vjdlh/
Is it possible to solve and not mark a second DIV?
If I do not redirect to a website, it works normally, but I need to redirect. =(

Hover menu on iPad (iOS 8) horizontal causes tap/click events in wrong elements

I have a navigation menu that on a desktop browser uses a hover event that expands a collapsed menu. It works fine on Desktop.
The problem is that on the iPad it appears like the wrong menu item is tapped.
Steps to reproduce:
Put iPad in horizontal mode
Go to http://qaphppos.blastohosting.com/PHP-Point-Of-Sale/
username: admin
password: 12345678
Click Sales on the left side
Try to click any other item on the left side and you will see that your click doesn't translate to the right menu item.
Is this a bug in iOS 8 or is this something that I can even fix? I wouldn't mind if they had to tap twice (once to open menu and once to select); but I am not sure how to do this.
I think the problem is that you are setting focus with JavaScript on the textbox labelled “enter item name or scan”. So your first tap is losing focus for the textbox, and the second actually select the menu.
After entering sales:
Try tapping on a black space. You will see the textbox lose focus.
Try tapping on the menu items, they will work.
As Joe mentioned problem is in setting focus on the textbox labelled "enter item name or scan barcode".
But I wan't to mention that your textbox is not getting exact focus, it is looking like textbox is in focus but it's not, because if textbox is in full focus then device keypad should open automatically as soon as textbox gets focus.
I think css class for textbox focus is setting but textbox is not getting focus.

how to keep selected highlight

The process is like this as below.
a user choose some text and make selection on it. then it's gonna be highlighted.
the user move her mouse focus on the textbox on the html.
the highlight on the text in the html is still there.
If the user move her mouse back to the text, click somewhere on the text zone, the highlight would be gone.
The user can make another new highlight.
Here's my question.
Can I keep the highlight even though I change the focus on other object from text in the html?
I don't want to use span for it since if I want to make new highlight, it's tedious to move the span back out. Is there another way?
Try this: http://rangy.googlecode.com/svn/trunk/demos/highlighter.html?serializedHighlights=