Comments (2)
Notice that when onfocusout (or onblur for that matter) fires, focus has not yet been assigned to another element, so document.activeElement will temporarily return <body>
, as the example demonstrates. So if we want to be able to obtain the element soon to be focused, we might need to provide it to the event handlers like demonstrated below.
control.OnBlur(function(sender: Fit.Controls.ControlBase, args: { Target: HTMLElement, Origin: HTMLElement | null }) {});
Basically we just need to forward e.target and e.relatedTarget.
from fit.ui.
Example improved to prove it respects expected event order when control lose focus:
OnMouseDown => Control's OnBlur => OnMouseUp => OnClick
https://jsfiddle.net/6qzenLcg/
from fit.ui.
Related Issues (20)
- WSDropDown: Changing selected items and reloading data restores previously selected items HOT 3
- WSDropDown: Changes made to pickers are not always synchronized to dropdown HOT 2
- DropDown: Switching to TreeView is extremely slow when DropDown contains huge selection (15.000+) HOT 1
- DatePicker doesn't work on legacy hybrid PCs (laptops with touch screens) if touch is primary pointer HOT 1
- OpenDropDown() does not work on DropDown created during OnClick event HOT 3
- 3 event handlers leaking memory: ContextMenu (used by TreeView) and DragDrop (used by DropDown)
- IOS: DropDown: Delete icon [X] does not work on touch
- iOS: DatePicker: Virtual keyboard temporarily shows up when activating calendar
- Typings for Fit.Core.Merge(..) does not guard against null arguments
- DropDown: Selected items positioned slightly too high HOT 1
- Mouse/touch target available on Fit.Events.GetPointerState().Target but typings says Fit.Events.GetPointerState().Buttons.Target HOT 1
- WSDropDown: ResetActionMenu() prevents Action Menu from updating to reflect current state HOT 1
- WSDropDown: Reloading TreeView causes Action Menu to disappear HOT 3
- Fit.Core.Clone(..) replaces undefined in arrays with null
- Memory leaks - nullifying DOM elements with event handlers attached is not sufficient HOT 1
- Do not use reserved keyword interface HOT 2
- DatePicker: Show() throws error if not mounted in DOM HOT 1
- DropDown: DetectBoundaries(..) not working when pull down menu has no max height HOT 1
- Fit.Loader: Memory leak due to link/script tags remaining in DOM after load
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fit.ui.