mouseout is used for keeping oldSelectionLength up-to-date. Unfortunately IE would refocus inputs when getting seletion length. Now mouseout listener is only active when clicking and dragging out of the input, which was why the event was needed in the first place.
…eypress/` where possible
Programmatically triggered events that do not include key modifiers (`altKey`, `shiftKey`, `ctrlKey`) properties would fail even when combination didn't require these keys.
Uninitializing mask now restores the model value to the input. IinitializeElement() now uses $modelValue instead of $viewValue for more accurate/consistent behavior. Fix bug with value parser was setting for $viewValue. In short, $viewValue will never be set to an empty mask. And $modelValue is now King Hippo.
$viewValue wasn't reflecting the element value after the eventHandler finished processing the value. The raw value is now being masked and set as the $viewValue so it will accurately reflect what the user sees after a keypress. Additionally, eventHandler altered the raw value in some cases; those cases weren't $apply'ing the changed value as they should have been.
This should fix a problem I had, in which multiple sortables in a document clobbered up each others scope. For example, updating a REST resource in the stop callback didn't work, because always the route of the last sortable in the DOM was called.
…d (AFAIK) use the correct values to render elements. Previously the select control was using modelValue as opposed to viewValue inside the $render method. This meant that cool tricks (like injecting parsers and formatters did not work properly). Also changed the directive initialisation to be more robust. In certain cases the initial value was not being set correctly... meaning that on recreation, any bound data would not show up properly.