{
  "slug": "cypress-scrollbehavior-supports-per-axis-alignment-bb3be0725bb9",
  "title": "Cypress scrollBehavior supports per-axis alignment",
  "tools": [
    "cypress"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-04T00:00:00.000Z",
  "announced_at": "2026-08-04T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When an action must place an element predictably in independently positioned horizontal and vertical content, set `scrollBehavior` to an object with the desired `block` and `inline` alignments. For example, use `{ block: 'start', inline: 'nearest' }` to align the vertical axis to the start and the horizontal axis to the nearest position.",
    "examples": [
      "const { defineConfig } = require('cypress')\n\nmodule.exports = defineConfig({\n  scrollBehavior: { block: 'start', inline: 'nearest' },\n})"
    ],
    "gotchas": [
      "Version: 15.20.0",
      "scrollBehavior: Configuration option for the viewport position before action commands; accepts a single alignment, an object with axis alignments, or `false`.",
      "scrollBehavior.block: Vertical axis alignment; allowed values: `'start'`, `'end'`, `'center'`, `'nearest'`.",
      "scrollBehavior.inline: Horizontal axis alignment; allowed values: `'start'`, `'end'`, `'center'`, `'nearest'`. `block` and `inline` independently control their axes; neither is documented as mutually exclusive with the other.",
      "scrollBehavior` (single alignment): A single value applies to both axes; `'start'` and `'end'` are supported, along with `'top'`, `'bottom'`, `'center'`, and `'nearest'`.",
      "The per-axis form accepts the same values as native `scrollIntoView`: `'start'`, `'end'`, `'center'`, and `'nearest'`.",
      "A single value accepts the new `'start'` and `'end'` alignments."
    ]
  },
  "why_it_matters": "Configure an element’s alignment before a Cypress action when editing or testing a page with independently positioned horizontal and vertical content.",
  "sources": [
    "https://docs.cypress.io/app/references/changelog#15-20-0",
    "https://docs.cypress.io/app/core-concepts/interacting-with-elements",
    "https://docs.cypress.io/app/references/configuration"
  ],
  "rank": 0.95027,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-92459f37f82ec05a-0:gate",
    "evidence_hash": "73ebdd0547a99788aca68710cd042dd76b006a26fd6d3bba2bf683ad8c898da6"
  },
  "review": {
    "draft_hash": "349f28e241013ece1817d083d84bebc127c0d2a2f8727f127b2bf41490e3fb3d",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
