Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5720 closed Bug (wontfix)

SCAYT set focus on mode switch

Reported by: Garry Yao Owned by:
Priority: Normal Milestone: CKEditor 3.3
Component: General Version: SVN (CKEditor) - OLD
Keywords: Confirmed Review- Cc: WebSpellChecker.net

Description

Reproducing Procedures

  1. Make sure SCAYT is enabled, then put focus into editor;
  2. Switch to 'Source' mode and switch back.
    • Actual Result: The cursor is blinking at the start of document.
    • Expected Result: Editor should gain no focus.

Attachments (3)

5720.patch (1.2 KB) - added by WebSpellChecker.net 14 years ago.
5720_2.patch (1.6 KB) - added by WebSpellChecker.net 14 years ago.
5720_3.patch (4.8 KB) - added by WebSpellChecker.net 14 years ago.

Download all attachments as: .zip

Change History (10)

Changed 14 years ago by WebSpellChecker.net

Attachment: 5720.patch added

comment:1 Changed 14 years ago by Garry Yao

Keywords: Review- added

Scope of 'is_control_restored' must NOT be on global.

Changed 14 years ago by WebSpellChecker.net

Attachment: 5720_2.patch added

comment:2 Changed 14 years ago by WebSpellChecker.net

patch proposed which make 'is_control_restored' non global

comment:3 Changed 14 years ago by Garry Yao

Why the 'restored' flag is never get reverted?

comment:4 Changed 14 years ago by WebSpellChecker.net

This flag is used in scayt.onLoad handler which is called

  1. when SCAYT just initialzied it should set focus to editable control only if editor.focusManager.hasFocus is set to true (restored flag set to false)
  2. when SCAYT is re-enabled (restored) (Source->WYSIWYG), editor.focusManager.hasFocus is set to true so scayt.onLoad will set the focus anyway. Setting the 'restored' flag will prevent setting of focus.

May be name of this variable is not suitable for this purpose?

During preparation of this fix we have discovered problem with other variable - control_id - which is also global. On the page with multiple editors enabling/disabling SCAYT follow to JS error. We are in progress preparing one mroe patch.

comment:5 Changed 14 years ago by Garry Yao

Does 'restored' keep staying 'true' once switched from 'Source'?

comment:6 Changed 14 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: newclosed

In fact, the behavior we're having because of SCAYT is desirable, but the problem is that it should not be a SCAYT job to do that. So for now, let's leave it as it is, have another ticket that uniforms this behavior even without SCAYT and also in source mode.

Changed 14 years ago by WebSpellChecker.net

Attachment: 5720_3.patch added

comment:7 Changed 14 years ago by WebSpellChecker.net

This patch fix whole problem with scayt's global vars and its states storing Similar problems is reported in #5741 and all of them fixed with 5720_3.patch

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy