GULP DIST
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass } from '../_rollupPluginBabelHelpers-a0b34764.js';
|
||||
import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass } from '../_rollupPluginBabelHelpers-b054ecd2.js';
|
||||
import HTMLMaskElement from './html-mask-element.js';
|
||||
import IMask from '../core/holder.js';
|
||||
import './mask-element.js';
|
||||
@@ -24,7 +24,14 @@ var HTMLContenteditableMaskElement = /*#__PURE__*/function (_HTMLMaskElement) {
|
||||
function get() {
|
||||
var root = this.rootElement;
|
||||
var selection = root.getSelection && root.getSelection();
|
||||
return selection && selection.anchorOffset;
|
||||
var anchorOffset = selection && selection.anchorOffset;
|
||||
var focusOffset = selection && selection.focusOffset;
|
||||
|
||||
if (focusOffset == null || anchorOffset == null || anchorOffset < focusOffset) {
|
||||
return anchorOffset;
|
||||
}
|
||||
|
||||
return focusOffset;
|
||||
}
|
||||
/**
|
||||
Returns HTMLElement selection end
|
||||
@@ -36,7 +43,14 @@ var HTMLContenteditableMaskElement = /*#__PURE__*/function (_HTMLMaskElement) {
|
||||
get: function get() {
|
||||
var root = this.rootElement;
|
||||
var selection = root.getSelection && root.getSelection();
|
||||
return selection && this._unsafeSelectionStart + String(selection).length;
|
||||
var anchorOffset = selection && selection.anchorOffset;
|
||||
var focusOffset = selection && selection.focusOffset;
|
||||
|
||||
if (focusOffset == null || anchorOffset == null || anchorOffset > focusOffset) {
|
||||
return anchorOffset;
|
||||
}
|
||||
|
||||
return focusOffset;
|
||||
}
|
||||
/**
|
||||
Sets HTMLElement selection
|
||||
|
||||
Reference in New Issue
Block a user