Skip to content

Code field instantiation issue when used in other tabs #14194

@aaronbushnell

Description

@aaronbushnell

Bug description

There's currently an issue with the code field when you use it in a tab that isn't the primary one. Once you click on the tab that has the code field it appears empty. Focusing into the field renders the content but it's superimposed on the line numbers.

The field in another tab before focusing

Image

The field after focusing

Image

How to reproduce

  1. Create a Code field, but place it into a tab outside of "Main"
  2. Begin creating a new entry and go to the tab that contains your field
  3. Save some content into the field
  4. Refresh and go to the tab that contains your Code field

Logs

Environment

Environment
Application Name: Statamic Starter
Laravel Version: 12.53.0
PHP Version: 8.4.18
Composer Version: 2.9.5
Environment: local
Debug Mode: ENABLED
URL: statamic-starter.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: resend
Queue: sync
Session: file

Storage
public/storage: LINKED

Statamic
Addons: 2
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.5.0 PRO

Statamic Addons
rias/statamic-redirect: 4.1.6
statamic/seo-pro: 7.1.1

Installation

Other (please explain)

Additional details

We're using our templated Statamic Starter project for this, just FYI

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions