#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 )
Hitting SHIFT+SPACE should insert a in the editor.
Attachments (4)
Change History (24)
comment:1 Changed 17 years ago by
| Description: | modified (diff) |
|---|
Changed 17 years ago by
| Attachment: | 2247.patch added |
|---|
comment:2 Changed 17 years ago by
| Keywords: | Review? added |
|---|---|
| Milestone: | → FCKeditor 2.6.1 |
| Status: | new → assigned |
comment:3 Changed 17 years ago by
| Summary: | CTRL+SPACE to insert → SHIFT+SPACE to insert |
|---|
comment:4 follow-up: 5 Changed 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|
The patch works in IE correctly, but on Firefox Shift-Space is inserting two spaces.
comment:5 Changed 17 years ago by
| 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 17 years ago by
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 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|
Review-. There are a few more serious problems with this patch:
- 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.
- Opera 9.50: Pressing Shift-Space produces line breaks instead of s.
The patch is ok on IE and Safari.
comment:8 Changed 17 years ago by
| Owner: | changed from Frederico Caldeira Knabben to Martin Kou |
|---|---|
| Status: | assigned → new |
comment:9 Changed 17 years ago by
| Status: | new → assigned |
|---|
Changed 17 years ago by
| Attachment: | 2247_2.patch added |
|---|
comment:10 Changed 17 years ago by
| 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 17 years ago by
| 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 17 years ago by
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 17 years ago by
| Attachment: | 2247_3.patch added |
|---|
comment:13 Changed 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|
The real fix is quite tricky, but it seems to work ok.
comment:14 Changed 17 years ago by
How have 2247_3.patch reached the trunk with no review? I've reverted [2236] with [2276].
Changed 17 years ago by
| Attachment: | 2247_4.patch added |
|---|
comment:15 Changed 17 years ago by
| 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 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|---|
| Owner: | changed from Martin Kou to Frederico Caldeira Knabben |
| Status: | assigned → new |
comment:17 Changed 17 years ago by
| Status: | new → assigned |
|---|
comment:18 Changed 17 years ago by
| Keywords: | Review+ added; Review? removed |
|---|

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