Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2247 closed New Feature (fixed)

SHIFT+SPACE to insert  

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

Description (last modified by fredck)

Hitting SHIFT+SPACE should insert a   in the editor.

Attachments (4)

2247.patch (2.6 KB) - added by fredck 8 years ago.
2247_2.patch (3.7 KB) - added by martinkou 8 years ago.
2247_3.patch (5.2 KB) - added by martinkou 8 years ago.
2247_4.patch (5.1 KB) - added by fredck 8 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 Changed 8 years ago by fredck

  • Description modified (diff)

Changed 8 years ago by fredck

comment:2 Changed 8 years ago by fredck

  • Keywords Review? added
  • Milestone set to FCKeditor 2.6.1
  • Status changed from new to assigned

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 8 years ago by fredck

  • Summary changed from CTRL+SPACE to insert   to SHIFT+SPACE to insert  

comment:4 follow-up: Changed 8 years ago by martinkou

  • 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 8 years ago by fredck

  • 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 8 years ago by martinkou

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 8 years ago by martinkou

  • 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 8 years ago by martinkou

  • Owner changed from fredck to martinkou
  • Status changed from assigned to new

comment:9 Changed 8 years ago by martinkou

  • Status changed from new to assigned

Changed 8 years ago by martinkou

comment:10 Changed 8 years ago by martinkou

  • 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 8 years ago by fredck

  • 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 8 years ago by martinkou

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 8 years ago by martinkou

comment:13 Changed 8 years ago by martinkou

  • Keywords Review? added; Review- removed

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

comment:14 Changed 8 years ago by fredck

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

Changed 8 years ago by fredck

comment:15 Changed 8 years ago by fredck

  • 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 8 years ago by fredck

  • Keywords Review? added; Review- removed
  • Owner changed from martinkou to fredck
  • Status changed from assigned to new

comment:17 Changed 8 years ago by fredck

  • Status changed from new to assigned

comment:18 Changed 8 years ago by martinkou

  • Keywords Review+ added; Review? removed

comment:19 Changed 8 years ago by fredck

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [2279].

comment:20 Changed 8 years ago by martinkou

The fix has caused bug #2412.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy