Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 9 years ago

#9964 closed defect (bug) (worksforme)

Press This is Hinky in 2.8

Reported by: jcwinnie's profile jcwinnie Owned by: noel's profile noel
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Press This Keywords: tool
Focuses: Cc:

Description

"Noise? What noise? I don't here any noise?"

O.K. so it is just me. I added the Press This script from 2.8-beta-2 to my FF Bookmarks Toolbar.

Whenever I see something about which to blog, I highlight the info, then click my Press This button.

A new window pops up, which is similar in appearance to a new post from the Dashboard. (As I recall, cannot verify such simlarity now, because Dashboard is borked.)

Anyway, functionality exists, e.g., can add tags. The problem is that the selected text is transparent, which discourages editing.

If I Save Draft, then edit, the selected text is visible.

And, I know the selected text is in the Press This window because I can drag the cursor across what appears to be empty space and the selected text appears highlighted.

No, I don't have an answer for you. & No, I won't burn a candle at the shrine of Saint Rasmus for this.

Change History (14)

#1 @jcwinnie
15 years ago

BTW: Older Press This script works.

#2 @ryan
15 years ago

  • Owner changed from ryan to noel
  • Status changed from new to assigned

#3 follow-up: @noel
15 years ago

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

I can't reproduce this - if you can provide some more precise instructions that would be helpful.

Also, please provide your FF version. Thanks!

#4 in reply to: ↑ 3 @jcwinnie
15 years ago

Replying to noel:

I can't reproduce this - if you can provide some more precise instructions that would be helpful.

Also, please provide your FF version. Thanks!

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1

Sorry, false positive. It would seem to be an interaction between a FF plug-in, Zemanta, and the Press This script that causes the text to become transparent.

#5 @jcwinnie
15 years ago

Well, I am going to leave it closed, in part because of the "Be more precise" intimidation, in part, due to a belief that the problem will pop up again, and, perhaps, someone more knowledgeable can point out the obvious.

Anyway, there may be more than one way that the transparent text reflects a problem. I was on another computer, using Chrome as a browser. I had previously added the most current Press This bookmark. Tried to blog some highlighted text. The text appeared transparent in the Press This window. Chrome lacks plugin accommodation, so Zemanta is not the reason for this problem.

Also, I incorrectly stated that an earlier script worked. Anyway, I should forget making the effort and get a life, eh? It is, after all, only a small nuisance. I don't need to use Press This.

#6 follow-up: @noel
15 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Some more info:

n the file: http://wordpress.com/wp-admin/js/editor.js

there is this code:

if(getUserSetting("editor")=="html"){if(a)
{b
("#content
").css("height",a.ch-15+"px")}}else{b("#content").css("color","white")

and in the original html document, the code for the pressthis text box
is:

class="mceEditor" rows="15">

#7 in reply to: ↑ 6 @noel
15 years ago

Replying to noel:

That should read in the file: /wp-admin/js/editor.js

#8 @longplay
15 years ago

I can confirm this, upgraded from 2.6 to 2.8.2 on one site which was working before and is not working now, as described, text is in the box, but not visible.

This does not affect the rich text editor.

I tried in FF3.5.1 (and earlier versions, probably from 3.1+) and Chrome 2 on Vista.

The text also ends up with several tabs before and after it.

See my comments in this forum thread: http://wordpress.org/support/topic/294796?replies=2

#9 @longplay
15 years ago

It doesn't appear in the source, but when I view the code in Firebug for the Press This page it shows the HTML for the textarea as:

<div class="editor-container">
<textarea rows="15" class="mceEditor" style="width: 100%; color: white;" id="content" name="content">
<p>content of post here</p>
</textarea>
</div>

The bit that's missing from view source is the 'color:white' style. Delete it in Firebug and the text magically appears (presumably because the text is being set to white on a white background).

Firebug reports it as being the element.style, I couldn't find it using a quick search in the referenced CSS files, so I assume it's being added by a function somewhere.

I tried hard coding the colour to black on line 550 of press-this.php but while the source showed it OK, Firebug still reports is as "color:white" so I assume some code adds it when it loads (I do briefly see the text before it vanishes, so that would indicate my theory may be right).

Right, I eventually tracked it back to this code at the top of the wp-admin/js/editor.js file:

jQuery(document).ready(function(b){var a=wpCookies.getHash("TinyMCE_content_size");if(getUserSetting("editor")=="html"){if(a){b("#content").css("height",a.ch-15+"px")}}else{b("#content").css("color","white");...

I changed white to black and voila, suddenly the text is visible.

Now all I need to do is figure out what is adding all the tabs before and after.

#10 @longplay
15 years ago

Aha, that was even easier.

Looking at the code that echoes the URL/selection to the textarea it's beautifully indented on line 550+ of press-this.php (in wp-admin).

Unfortunately, all those lovely indentations that make it readable also get printed in the textarea. Remove them and the extra tabs vanish.

Print This is then usable again.

Tracked this down to change 9064 by azaozz 10 months ago.

#11 @longplay
15 years ago

The change to the jQuery to include the white CSS style was done to 'Hide text while editor is loading, show html editor on error' by azaozz in revision 11171, I assume this was something to make it a bit more seamless when using the richtext editor, not sure what impact simply removing the CSS will have.

#12 @scribu
15 years ago

  • Milestone changed from 2.8 to 2.9

#13 @noel
15 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

Setting as worksforme, because it does.

azaozz might be able to provide some more insight, but this was a but with tinymce, not Press This.

#14 @DrewAPicture
9 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.