#1486674 closed Bugs (fixed)
Composing in HTML jumps cursor to body instead of recipients
| Reported by: | smultron | Owned by: | |
|---|---|---|---|
| Priority: | 3 | Milestone: | 0.5-stable |
| Component: | User Interface | Version: | git-master |
| Severity: | normal | Keywords: | |
| Cc: |
Description
When 'Compose HTML messages' is enabled in the Settings: composing a new email jumps the text cursor down to the 'body' field of the email, instead of the expected 'Recipient' field.
This does not happen when composing using plain-text; the cursor stays in the 'Recipient' field as expected.
Tested in Firefox 3.6.3 and Safari 4.0.5 on Mac OS X 10.6.4
Change History (17)
comment:1 Changed 3 years ago by sckramer
- Component changed from Client Scripts to Core functionality
- Milestone changed from later to 0.4-stable
- Priority changed from 5 to 3
- Version changed from 0.4-beta to svn-trunk
comment:2 Changed 3 years ago by alec
- Component changed from Core functionality to User Interface
comment:3 Changed 3 years ago by toddtrann
Also works for me - I'm not able to reproduce this. Tested on trunk, cleared cache.
comment:4 Changed 3 years ago by toddtrann
Sorry, forgot to add I'm also on Windows (tested on both Firefox and IE). Will test on my Mac later tonight.
comment:5 Changed 3 years ago by toddtrann
Also did not see this bug on my Mac. Tried in both browsers, with both settings for where to start reply (above and below). In all cases, the cursor stayed in the recipient field.
Firefox 3.5.9 & Safari 4.0.4, Mac OS 10.6.2
Todd
comment:6 Changed 3 years ago by smultron
After some process-of-elimination, I found the setting in main.inc.php which causes this to happen:
$rcmail_config['sig_above'] = true;
When set to true, cursor jumps to body. When false, it stays in 'Recipient' as it should.
comment:7 Changed 3 years ago by sckramer
this def. needs to be sorted out, I believe top-posting effects this also--
comment:8 Changed 3 years ago by sckramer
please see this other similar ticket:
comment:9 Changed 3 years ago by toddtrann
Aha, I see now thanks. You are correct, it requires HTML compose to be true, and also for top reply to be true. Then it happens.
The problem lies in program/js/apps.js around line 2826:
if (this.env.sig_above) {
if no existing sig and top posting then insert at caret pos
editor.getWin().focus(); correct focus in IE
I put some debug statements in, and those lines are changing the field focus after it has already been set. So for a brief moment in time the focus is on the "to" field, but then it changes. I think those lines need to take into account that this is a compose message, not a reply or forward.
Todd
comment:10 Changed 3 years ago by alec
- Resolution set to fixed
- Status changed from new to closed
Fixed in [1f019c8e].
comment:11 Changed 2 years ago by aweirig
- Resolution fixed deleted
- Status changed from closed to reopened
This is strange, I still have the problem with RC 0.4.2 installed on Mac OS X 10.6.5 with Safari 5.0.3 and Firefox 3.6.12
I have the following settings that could possibly cause the problem
$rcmail_configtop_posting? = true;
$rcmail_configstrip_existing_sig? = true;
$rcmail_configsig_above? = true;
$rcmail_confightmleditor? = true;
$rcmail_configpreview_pane? = true;
comment:12 Changed 2 years ago by alec
- Milestone changed from 0.4-stable to 0.5-stable
Could it be a duplicate of #1487073 ?
comment:13 Changed 2 years ago by aweirig
Hi milestone,
well, I'm not sure ... 1487073 talks about replying to a message, this happens when I write a new message, just as this case initially described. Also, in this case, the cursor is visible. I guess that the fix ([1f019c8e]) stated by alec fixes the initial problem but probably one of the settings still causes the problem to occur.
When replying to a message it's normal to put the focus in the editor, but when writing a new message you'd like to start typing the recipients before typing your message (usually).
comment:14 Changed 2 years ago by alec
- Resolution set to worksforme
- Status changed from reopened to closed
I'm unable to reproduce with 0.5-beta and the same settings.
comment:15 Changed 2 years ago by aweirig
- Resolution worksforme deleted
- Status changed from closed to reopened
Hi alec,
thanks for the feedback, I can confirm that the problem does not occur in Firefox (also tested with Camino), it does also not occur in Opera.
But it still occurs when using Safari and Chrome in Mac OS X 10.6.5. So the problem seems to be related to the WebKit? framework as the Gecko browsers are working.
Please do not close tickets so quickly ...
I have verified with 0.5.0 beta, I copied main.inc.php and db.inc.php from my 0.4.2 installation to the 0.5.0 beta.
Hope it helps.
comment:16 Changed 2 years ago by alec
- Resolution set to fixed
- Status changed from reopened to closed
Fixed in [43fb35b5].
comment:17 Changed 2 years ago by aweirig
Hi alec,
thanks a lot for the fix. I back-ported it into my 0.4.2 installation and it works like a charm !!!
Regards,
Alex

Works for me with FF 3.6.3 on WinXP. If recipient field is empty, cursor is on it.