Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2247 closed New Feature (fixed)

SHIFT+SPACE to insert  

Reported by: Frederico Caldeira Knabben Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: FCKeditor 2.6.3
Component: General Version:
Keywords: Confirmed Review+ Cc:

Description (last modified by Frederico Caldeira Knabben)

Hitting SHIFT+SPACE should insert a   in the editor.

Attachments (4)

2247.patch (2.6 KB) - added by Frederico Caldeira Knabben 16 years ago.
2247_2.patch (3.7 KB) - added by Martin Kou 16 years ago.
2247_3.patch (5.2 KB) - added by Martin Kou 16 years ago.
2247_4.patch (5.1 KB) - added by Frederico Caldeira Knabben 16 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Description: modified (diff)

Changed 16 years ago by Frederico Caldeira Knabben

Attachment: 2247.patch added

comment:2 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review? added
Milestone: FCKeditor 2.6.1
Status: newassigned

The provide patch currently works well with IE, Safari and Opera. For Firefox, it depends on #2248, so we should wait for it first, before a Review+.

comment:3 Changed 16 years ago by Frederico Caldeira Knabben

Summary: CTRL+SPACE to insert  SHIFT+SPACE to insert  

comment:4 Changed 16 years ago by Martin Kou

Keywords: Review- added; Review? removed

The patch works in IE correctly, but on Firefox Shift-Space is inserting two spaces.

comment:5 in reply to:  4 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed

Replying to martinkou:

on Firefox Shift-Space is inserting two spaces.

For me, it is inserting only one space. Is there any specific action to do to see the two spaces thing?

I'm testing with FF3 over Windows, but I remember having the same results with FF2.

comment:6 Changed 16 years ago by Martin Kou

I've tested the patch again and it doesn't seem to be printing two spaces anymore. But now it's not always printing   after a few Shift-Space was pressed - some of the spaces are still regular spaces.

comment:7 Changed 16 years ago by Martin Kou

Keywords: Review- added; Review? removed

Review-. There are a few more serious problems with this patch:

  1. Firefox 2 and 3: If you press Shift-Space more than 4 times, than every other Shift-Space will produce a regular space and also will not move the caret forward.
  2. Opera 9.50: Pressing Shift-Space produces line breaks instead of  s.

The patch is ok on IE and Safari.

comment:8 Changed 16 years ago by Martin Kou

Owner: changed from Frederico Caldeira Knabben to Martin Kou
Status: assignednew

comment:9 Changed 16 years ago by Martin Kou

Status: newassigned

Changed 16 years ago by Martin Kou

Attachment: 2247_2.patch added

comment:10 Changed 16 years ago by Martin Kou

Keywords: Review? added; Review- removed

The fix to #2248 doesn't seem to work on FF3 now, but I've found a much simpler way to workaround Gecko's   bug. I've embedded the new fix in my patch and it seems to fix the problem.

comment:11 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

We are almost there with the latest proposal. But, always with Firefox, the first space results in a plain space. So, if you press SHIFT+SPACE one, you get " "; twice you get "  "; more spaces get all properly outputted as " ".

The fact is that this feature will be mainly used with a single space when a user wants to separate text but break them together, like "USD 1,500".

comment:12 Changed 16 years ago by Martin Kou

Hmm... this is tougher than it seems I'm afraid. I've tried various methods yesterday and today (e.g. trying your fix only for the first character, trying to modify the text node's value directly, etc.) but it always seems to go wrong by a little bit. I'm suspecting the Gecko developers are putting that space there on purpose to workaround something even more sinister.

Changed 16 years ago by Martin Kou

Attachment: 2247_3.patch added

comment:13 Changed 16 years ago by Martin Kou

Keywords: Review? added; Review- removed

The real fix is quite tricky, but it seems to work ok.

comment:14 Changed 16 years ago by Frederico Caldeira Knabben

How have 2247_3.patch reached the trunk with no review? I've reverted [2236] with [2276].

Changed 16 years ago by Frederico Caldeira Knabben

Attachment: 2247_4.patch added

comment:15 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

The 2247_3.patch looked too much tricky for me, and I still have raw spaces on some cases (like typing and adding spaces while typing).

I've worked on another clearer solution which also made the fix for #2248 simpler.

comment:16 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed
Owner: changed from Martin Kou to Frederico Caldeira Knabben
Status: assignednew

comment:17 Changed 16 years ago by Frederico Caldeira Knabben

Status: newassigned

comment:18 Changed 16 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:19 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [2279].

comment:20 Changed 16 years ago by Martin Kou

The fix has caused bug #2412.

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