@gechiui/dom
Version:
DOM utilities module for GeChiUI.
26 lines (21 loc) • 836 B
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = placeCaretAtVerticalEdge;
var _placeCaretAtEdge = _interopRequireDefault(require("./place-caret-at-edge"));
/**
* Internal dependencies
*/
/**
* Places the caret at the top or bottom of a given element.
*
* @param {HTMLElement} container Focusable element.
* @param {boolean} isReverse True for bottom, false for top.
* @param {DOMRect} [rect] The rectangle to position the caret with.
*/
function placeCaretAtVerticalEdge(container, isReverse, rect) {
return (0, _placeCaretAtEdge.default)(container, isReverse, rect === null || rect === void 0 ? void 0 : rect.left);
}
//# sourceMappingURL=place-caret-at-vertical-edge.js.map