Fix compose focus steal; add contact picker to To field; v1.1.17

- Focus effect now only fires when compose/reply first opens, not on every
  keystroke — typing in the To field no longer jumps focus to the body
- 👥 button next to To field opens a searchable contact picker dropdown;
  selecting a contact fills in email and name instantly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmert
2026-07-28 12:15:45 -04:00
parent f0635753f1
commit a263f40178
3 changed files with 165 additions and 11 deletions
+100
View File
@@ -9765,6 +9765,106 @@
border-color: rgba(201, 168, 76, 0.45);
}
.em-to-field-wrap {
flex: 1;
position: relative;
display: flex;
align-items: center;
gap: 0.4rem;
min-width: 0;
}
.em-to-field-wrap .em-compose-input {
flex: 1;
min-width: 0;
}
.em-contact-pick-btn {
background: rgba(255,255,255,0.06);
border: 1px solid rgba(201,168,76,0.2);
border-radius: 6px;
color: #c8b898;
font-size: 0.9rem;
padding: 0.3rem 0.45rem;
cursor: pointer;
flex-shrink: 0;
line-height: 1;
transition: background 0.12s;
}
.em-contact-pick-btn:hover { background: rgba(255,255,255,0.1); }
.em-contact-picker {
position: absolute;
top: calc(100% + 4px);
left: 0;
right: 36px;
background: #1e1c16;
border: 1px solid rgba(201,168,76,0.3);
border-radius: 8px;
box-shadow: 0 8px 24px rgba(0,0,0,0.6);
z-index: 50;
overflow: hidden;
}
.em-contact-picker-search {
width: 100%;
box-sizing: border-box;
background: transparent;
border: none;
border-bottom: 1px solid rgba(201,168,76,0.15);
padding: 0.5rem 0.75rem;
color: #f0ead8;
font-size: 0.85rem;
font-family: system-ui, sans-serif;
outline: none;
}
.em-contact-picker-list {
max-height: 220px;
overflow-y: auto;
}
.em-contact-picker-empty {
padding: 0.6rem 0.75rem;
color: #6a6050;
font-size: 0.83rem;
}
.em-contact-picker-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
width: 100%;
padding: 0.45rem 0.75rem;
background: none;
border: none;
cursor: pointer;
text-align: left;
transition: background 0.1s;
}
.em-contact-picker-item:hover { background: rgba(255,255,255,0.06); }
.em-contact-picker-name {
font-size: 0.85rem;
color: #e8e2d5;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex-shrink: 0;
max-width: 45%;
}
.em-contact-picker-email {
font-size: 0.78rem;
color: #c8860a;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
text-align: right;
}
.em-compose-select {
flex: 1;
background: #14130f;