Ticket #2247 (closed New Feature: fixed)

Opened 22 months ago

Last modified 20 months ago

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) (diff)

Hitting SHIFT+SPACE should insert a   in the editor.

Attachments

2247.patch Download (2.6 KB) - added by fredck 22 months ago.
2247_2.patch Download (3.7 KB) - added by martinkou 20 months ago.
2247_3.patch Download (5.2 KB) - added by martinkou 20 months ago.
2247_4.patch Download (5.1 KB) - added by fredck 20 months ago.

Change History

  Changed 22 months ago by fredck

  • description modified (diff)

Changed 22 months ago by fredck

  Changed 22 months ago by fredck

  • keywords Review? added
  • status changed from new to assigned
  • milestone set to FCKeditor 2.6.1

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+.

  Changed 22 months ago by fredck

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

follow-up: ↓ 5   Changed 22 months ago by martinkou

  • keywords Review- added; Review? removed

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

in reply to: ↑ 4   Changed 21 months 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.

  Changed 21 months 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.

  Changed 21 months 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.

  Changed 21 months ago by martinkou

  • owner changed from fredck to martinkou
  • status changed from assigned to new

  Changed 21 months ago by martinkou

  • status changed from new to assigned

Changed 20 months ago by martinkou

  Changed 20 months 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.

  Changed 20 months 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".

  Changed 20 months 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 20 months ago by martinkou

  Changed 20 months ago by martinkou

  • keywords Review? added; Review- removed

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

  Changed 20 months ago by fredck

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

Changed 20 months ago by fredck

  Changed 20 months 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.

  Changed 20 months ago by fredck

  • keywords Review? added; Review- removed
  • owner changed from martinkou to fredck
  • status changed from assigned to new

  Changed 20 months ago by fredck

  • status changed from new to assigned

  Changed 20 months ago by martinkou

  • keywords Review+ added; Review? removed

  Changed 20 months ago by fredck

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [2279].

  Changed 20 months ago by martinkou

The fix has caused bug #2412.

Note: See TracTickets for help on using tickets.