Release Vulpes OS 2.7-preview.24

This commit is contained in:
OverSu 2026-11-04 12:52:20 +01:00
commit 97ef99f827
135 changed files with 7717 additions and 2524 deletions

View file

@ -5,14 +5,7 @@ import {InputEditor} from 'resource://vulpes/services/input-editor.mjs';
export class KeypadChild extends JSWindowActorChild {
receiveMessage(message) {
if (message.name === 'Vulpes:FocusBrowserToolbar') {
if (this.document.location.hostname !== 'system.localhost') return;
const bar = [...this.document.querySelectorAll('.chrome .urlbar')].find(element => {
if (!element.checkVisibility({checkOpacity:true,checkVisibilityCSS:true})) return false;
const rect = element.getBoundingClientRect();
return rect.width > 0 && element.contains(this.document.elementFromPoint(
rect.x + rect.width / 2, rect.y + rect.height / 2));
});
if (bar) this.select(bar);
this.focusBrowserToolbar();
return;
}
if (message.name !== 'Vulpes:Navigate') return;
@ -37,6 +30,13 @@ export class KeypadChild extends JSWindowActorChild {
this.hashStartReturnMode=this.composer.returnMode;
}
const target = document.activeElement;
// The collapsed Gaia rocketbar can leave its search input focused after
// dismissing address entry. On keypad devices, Up should still reopen the
// browser toolbar instead of moving the caret in that hidden input.
if (key === 'ArrowUp' && document.location.hostname === 'system.localhost' &&
target?.id === 'rocketbar-input' && !document.querySelector('#rocketbar')?.classList.contains('active')) {
if (this.focusBrowserToolbar()) return;
}
const editing = !target?.readOnly && (target?.isContentEditable || target?.localName === 'textarea' ||
(target?.localName === 'input' && ['text','search','email','url','tel','password','number'].includes(target.type)));
const modal = [...document.querySelectorAll('[aria-modal="true"],[data-type="confirm"],[data-type="action"]')]
@ -172,6 +172,18 @@ export class KeypadChild extends JSWindowActorChild {
}
this.select(elements[index]);
}
focusBrowserToolbar() {
if (this.document.location.hostname !== 'system.localhost') return false;
const bar = [...this.document.querySelectorAll('.chrome .urlbar')].find(element => {
if (!element.checkVisibility({checkOpacity:true,checkVisibilityCSS:true})) return false;
const rect = element.getBoundingClientRect();
return rect.width > 0 && element.contains(this.document.elementFromPoint(
rect.x + rect.width / 2, rect.y + rect.height / 2));
});
if (!bar) return false;
this.select(bar);
return true;
}
select(element) {
const document = this.document;
if (!this.style) {