@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
16 lines • 666 B
JavaScript
import memorizeOne from 'memoize-one';
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
export var isAnchorSupported = memorizeOne(function () {
if (window.CSS && window.CSS.supports) {
return window.CSS.supports('anchor-name: --anchor');
}
return false;
});
export var isNativeStickySupported = function isNativeStickySupported(isDragAndDropEnabled) {
var safariVersion = getBrowserInfo().safari_version;
var isBrowserSafari = !Number.isNaN(safariVersion);
return (
// Safari has a bug with position: sticky and content editable, so we don't support it
!isBrowserSafari && isAnchorSupported() && isDragAndDropEnabled
);
};