NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Typing quotes in editor gives unexpected results


Joined: 14 Jun 2012
Posts: 2
Reply with quote
I am trying to type something similar to the following into the PHP editor.

Code:
 $name = 'freddo';

Scenario 1:
When typing the leading quote character to start the string, the leading quote character is not displayed.
If I continue to type the string value, the leading quote character magically appears when I type the first character of the string value.
When I finish typing the string value and type the closing quote character, the closing quote character is not displayed.

Now...
    If I type a space after the trailing quote, the quote appears but the space does not.
    If I type the ';' character after the quote and both characters appear.
    If I click the mouse in some other location in the editor window, the trailing quote does not appear.
Scenario 2:
If I choose not to type the quotes (or forgot).

Now...
    If I put the cursor at the start of the string and type the leading quote and then put the cursor at the end of the string and type the trailing quote. Instead of a quoted string, I get two empty quote characters at the end and no quote character at the start (example in code block below).
    If I select the text to be quoted and type a quote character, nothing happens (Version 6 would surround the selection with the quote character. I loved that feature.).
Code:
 $name = freddo'';

These behaviors are new in Version 7, are the same for single, double and back quotes(' ', " ", ` `) and are extremely counter productive. Version 6 did not do this.
(FYI, this forum editor has the same unhelpful behaviors)

Apart from reverting to version 6, how can I get quotes to simply appear in the text when I type them?
Please note that I am using the Windows version (Version 7.0 Build 7034) and have already tried changing the setting "Auto-close quotes" from on to off in Editor Options, with no effect.

Thanks
View user's profileFind all posts by bruceanwylSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I'm using 7034 with Auto-close quotes switched off (because I don't like that feature) and have never had any issues with this or any other version of PhpED. I suggest reporting it as a possible bug http://www.nusphere.com/contact_us/

As for the forum doing strange things in the editor, if you are using Internet Explorer 8 then try turning on compatibility view by clicking the broken page icon next to the address field. For me it fixed various issues.
View user's profileFind all posts by plugnplaySend private message
Typing quotes in the editor gives unexpected results


Joined: 14 Jun 2012
Posts: 2
Reply with quote
Thanks for looking at this problem.

I have now found the culprit... it was the operating system. The MS Windows keyboard input method was set to "US - International" instead of just "US" and in that circumstance, the quote character is used as a short cut to indicate that the next character typed is an "international" character. eg 'c would produce the c with a little squiggle below it.

That also explains why the same behavior was occurring in the forum editor.
View user's profileFind all posts by bruceanwylSend private message
[resolved] Typing quotes in editor gives unexpected results
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic