# Remove initialize from the Element trait \(\#3338\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e5ada92b7bf7e558ced2d71696f2a079b60d5e60)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e5ada92b7bf7e558ced2d71696f2a079b60d5e60

Requested commit: e5ada92b7bf7e558ced2d71696f2a079b60d5e60

Commit: e5ada92b7bf7e558ced2d71696f2a079b60d5e60

Tree: 51c45a917486423b5c11c4015fcc6c0987581d96

Author: Nathan Sobo

Committer: GitHub

## Message

```
Remove initialize from the Element trait (#3338)

Initially, we imagined registering keyboard handlers in the initialize
phase so we would understand the relationships between focus handles
during the layout pass, which would allow us to assign assign `focus_in`
styles that impact layout.

However, we soon realized that many elements aren't created until paint
time anyway, such as within the uniform list. Since it's impossible to
know prior to paint whether an element contains the focused element, it
makes more sense to eliminate the `focus_in` styling helper.

Release Notes:

- N/A
```

## Parents

- [0e79a7f26b05c3d56c156a63c9f032687e978392](https://git.cafe/gitcafe/zed/commit/0e79a7f26b05c3d56c156a63c9f032687e978392?format=markdown)

- [4f096333793ad83577769b15a9203560aac67cfd](https://git.cafe/gitcafe/zed/commit/4f096333793ad83577769b15a9203560aac67cfd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e5ada92b7bf7e558ced2d71696f2a079b60d5e60?format=markdown)
