Skip to content

Commit 395ff00

Browse files
committed
added better selectors for handling different screen sizes for desktops
Signed-off-by: Vedansh Saini <[email protected]>
1 parent bb6b976 commit 395ff00

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/scripts/emailClientAdapter.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ class EmailClientAdapter {
2424
outlook: {
2525
selectors: {
2626
body: 'div[role="textbox"][contenteditable="true"][aria-multiline="true"]',
27-
subject: 'input[aria-label="Add a subject"][type="text"]',
27+
subject: [
28+
'input[aria-label="Subject"][type="text"]',
29+
'input[aria-label="Add a subject"][type="text"]',
30+
],
2831
},
2932
eventTypes: {
3033
contentChange: 'input',
@@ -34,8 +37,18 @@ class EmailClientAdapter {
3437
},
3538
yahoo: {
3639
selectors: {
37-
body: '#editor-container [contenteditable="true"][role="textbox"]',
38-
subject: '#compose-subject-input, input[placeholder="Subject"][id="compose-subject-input"]',
40+
body: [
41+
// Desktop selectors
42+
'#editor-container [contenteditable="true"][role="textbox"]',
43+
// Mobile selectors
44+
'#editoor-container-mobile [contentditable="true"][role="textbox"]',
45+
],
46+
subject: [
47+
// Desktop selectors
48+
'#compose-subject-input, input[placeholder="Subject"][id="compose-subject-input"]',
49+
// Mobile selectors
50+
'#compose-subject-input-mobile, input[placeholder="Subject"][id="compose-subject-input-mobile"]'
51+
],
3952
},
4053
eventTypes: {
4154
contentChange: 'input',

0 commit comments

Comments
 (0)