fix(android): the detail panel can no longer be dragged sideways
The editing row kept the full-width field and set three buttons beside it, so the line was wider than the frame. A pane scrollable on one axis is scrollable on both - the specification turns the untouched axis into `auto` - so the overflow was draggable, and the keyboard's Enter key brought the field back into view, taking the whole panel with it. The field now shares its line, and no pane scrolls sideways. Enter validates, which is what the key was pressed for.
This commit is contained in:
@@ -67,7 +67,8 @@
|
||||
body.on-detail #list { transform: translateX(-22%); }
|
||||
body.on-detail #detail { transform: translateX(0); }
|
||||
|
||||
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
|
||||
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overscroll-behavior: contain; padding: 0 12px 16px; }
|
||||
|
||||
/* --- barre de recherche ------------------------------------------------ */
|
||||
@@ -585,13 +586,19 @@ function openEditor(k) {
|
||||
line.innerHTML =
|
||||
'<input class="field-in" id="editval" type="password" autocomplete="off"'
|
||||
+ ' autocorrect="off" autocapitalize="none" spellcheck="false"'
|
||||
+ ' style="margin:0">'
|
||||
+ ' style="margin:0;flex:1;min-width:0;width:auto">'
|
||||
+ '<button class="btn" data-editshow>Show</button>'
|
||||
+ '<button class="btn" data-editcancel>Cancel</button>'
|
||||
+ '<button class="btn main" data-editsave>Save</button>';
|
||||
var input = document.getElementById('editval');
|
||||
input.value = detailRows[k].v;
|
||||
input.focus();
|
||||
input.addEventListener('keydown', function (ev) {
|
||||
if (ev.key !== 'Enter') return;
|
||||
ev.preventDefault();
|
||||
var save = document.querySelector('[data-editsave]');
|
||||
if (save && !save.disabled) save.click();
|
||||
});
|
||||
send('touch');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user