<commit_before>// @flow
import getWindow from './getWindow';
import getNodeName from './getNodeName';
import getComputedStyle from './getComputedStyle';
import { isHTMLElement } from './instanceOf';
import isTableElement from './isTableElement';

// https://stackoverflow.com/a/9851769/2059996
const isFirefox = () => typeof window.InstallTrigger !== 'undefined';

function getTrueOffsetParent(element: Element): ?Element {
  let offsetParent;

  if (
    !isHTMLElement(element) ||
    !(offsetParent = element.offsetParent) ||
    // https://github.com/popperjs/popper-core/issues/837
    (isFirefox() && getComputedStyle(offsetParent).position === 'fixed')
  ) {
    return null;
  }<commit_msg>fix: firefox offsetParent check<commit_after>// @flow
import getWindow from './getWindow';
import getNodeName from './getNodeName';
import getComputedStyle from './getComputedStyle';
import { isHTMLElement } from './instanceOf';
import isTableElement from './isTableElement';

// https://stackoverflow.com/a/9851769/2059996
const isFirefox = () => typeof window.InstallTrigger !== 'undefined';

function getTrueOffsetParent(element: Element): ?Element {
  let offsetParent;

  if (
    !isHTMLElement(element) ||
    !(offsetParent = element.offsetParent) ||
    // https://github.com/popperjs/popper-core/issues/837
    (isFirefox() && getComputedStyle(element).position === 'fixed')
  ) {
    return null;
  }
{'fraction_non_alphanumeric': 0.14691270404542228, 'fraction_numerical': 0.0241305890702626, 'mean_word_length': 4.551181102362205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '224877', 'n_tokens_mistral': 438, 'n_tokens_neox': 423, 'n_words': 91}