Is there any way to find out element the click causing blur even was made over?
I need to have value of a ui-select set to what user has typed in when he clicks outside of the dropdown. But when he clicks on the dropdown item the input should be discarded and item selected. So I should understand where was the mouse when user clicked outside ui-select's input. I tried
element.find('input').on('blur', function (e) {
e.target
...
});
but target always points to the
input.form-control.ui-select-search.ng-valid.ng-touched.ng-dirty.ng-valid-parse
The
Get element currently under mouse without using mouse events
always finds highlighted dropdown item ad
Determine which element the mouse pointer is on top of in Javascript
doesn't work as I can't any of the DOM X/Y properties.
Any ideas?
ps: no jquery.