mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
fx140: Add draft macOS native-like textarea style
Firefox doesn't use any native textareas anymore, so I guess they just removed/broke native textarea rendering.
This commit is contained in:
parent
072b2e3285
commit
e4878052aa
7 changed files with 14 additions and 5 deletions
|
|
@ -393,7 +393,7 @@ var CollectionTree = class CollectionTree extends LibraryTree {
|
|||
label.className = 'cell-text';
|
||||
label.dataset.rowId = treeRow.id;
|
||||
label.setAttribute("size", 5);
|
||||
label.toggleAttribute("no-windows-native", true);
|
||||
label.toggleAttribute("no-native", true);
|
||||
label.value = treeRow.editingName;
|
||||
label.addEventListener('input', e => this.handleEditingChange(e, index));
|
||||
label.addEventListener('mousedown', (e) => e.stopImmediatePropagation());
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@
|
|||
// tabindex for keyboard handling
|
||||
input.setAttribute("tabindex", 0);
|
||||
// hide windows appearance from _input.scss
|
||||
input.setAttribute("no-windows-native", true);
|
||||
input.setAttribute("no-native", true);
|
||||
input.setAttribute("data-arrow-nav-enabled", true);
|
||||
input.className = "input empty";
|
||||
input.setAttribute("data-l10n-id", "integration-citationDialog-input");
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@
|
|||
}
|
||||
input.rows = 1;
|
||||
input.classList.add('input');
|
||||
input.toggleAttribute("no-windows-native", true);
|
||||
input.toggleAttribute("no-native", true);
|
||||
input.addEventListener('input', this._handleInput);
|
||||
input.addEventListener('change', this._handleChange);
|
||||
input.addEventListener('focus', this._handleFocus);
|
||||
|
|
|
|||
7
scss/mac/components/_input.scss
Normal file
7
scss/mac/components/_input.scss
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// TODO: Fx140: Give this a border/shadow when not :focus-visible?
|
||||
:where(textarea:not([no-native])) {
|
||||
appearance: none;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
@include focus-ring;
|
||||
}
|
||||
|
|
@ -15,5 +15,6 @@
|
|||
|
||||
// Components
|
||||
|
||||
@import "mac/components/input";
|
||||
@import "mac/components/menupopup";
|
||||
@import "mac/components/menulist";
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
textbox,
|
||||
search-textbox,
|
||||
textarea
|
||||
):where(:not([no-windows-native])) {
|
||||
):where(:not([no-native])) {
|
||||
appearance: none;
|
||||
height: 26px;
|
||||
padding: 0;
|
||||
|
|
@ -126,6 +126,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
textarea:not([no-windows-native]) {
|
||||
textarea:not([no-native]) {
|
||||
height: unset;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
@import "mac/tabBar";
|
||||
@import "mac/tabbox";
|
||||
@import "mac/titleBar";
|
||||
@import "mac/components/input";
|
||||
@import "mac/components/menupopup";
|
||||
@import "mac/components/menulist";
|
||||
@import "mac/citationExplorer";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue