mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-19 09:36:59 +03:00
Fix edit mode focus stealing (#172)
This commit is contained in:
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -6169,7 +6169,9 @@ void main() {
|
||||
}
|
||||
|
||||
function shouldFocusSteerChat() {
|
||||
return state !== 'CONFIGURING' && !steerLocked;
|
||||
return state !== 'CONFIGURING'
|
||||
&& state !== 'EDITING'
|
||||
&& !steerLocked;
|
||||
}
|
||||
|
||||
function pageHasHostTextSelection() {
|
||||
|
||||
@@ -90,6 +90,14 @@ describe('live-browser.js regression guards', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('does not autofocus the steering chat while inline editing', () => {
|
||||
assert.match(
|
||||
SOURCE,
|
||||
/function shouldFocusSteerChat\(\) \{\s*return state !== 'CONFIGURING'\s*&& state !== 'EDITING'\s*&& !steerLocked;\s*\}/,
|
||||
'edit-mode contenteditable focus must not be stolen by the global steering chat focus recovery',
|
||||
);
|
||||
});
|
||||
|
||||
it('does not shadow the global live state when storing Apply state', () => {
|
||||
assert.doesNotMatch(
|
||||
SOURCE,
|
||||
|
||||
Reference in New Issue
Block a user