MCPcopy Create free account
hub / github.com/ampproject/amphtml / doRadixFocus

Function doRadixFocus

third_party/inputmask/inputmask.js:1972–1989  ·  view source on GitHub ↗
(clickPos)

Source from the content-addressed store, hash-verified

1970 },
1971 clickEvent: function(e, tabbed) {
1972 function doRadixFocus(clickPos) {
1973 if (opts.radixPoint !== "") {
1974 var vps = getMaskSet().validPositions;
1975 if (vps[clickPos] === undefined || vps[clickPos].input === getPlaceholder(clickPos)) {
1976 if (clickPos < seekNext(-1)) return true;
1977 var radixPos = $.inArray(opts.radixPoint, getBuffer());
1978 if (radixPos !== -1) {
1979 for (var vp in vps) {
1980 if (radixPos < vp && vps[vp].input !== getPlaceholder(vp)) {
1981 return false;
1982 }
1983 }
1984 return true;
1985 }
1986 }
1987 }
1988 return false;
1989 }
1990 var input = this;
1991 setTimeout(function() {
1992 if (document.activeElement === input) {

Callers 1

maskScopeFunction · 0.85

Calls 4

getMaskSetFunction · 0.85
getPlaceholderFunction · 0.85
seekNextFunction · 0.85
getBufferFunction · 0.85

Tested by

no test coverage detected