Opened 6 years ago

Closed 6 years ago

#3462 closed enhancement (fixed)

Change in 'Add link' behaviour in RTE

Reported by: podz Owned by: skeltoac
Priority: lowest Milestone: 2.1
Component: Administration Version: 2.1
Severity: minor Keywords: has-patch commit
Cc:

Description

At one time, when you inserted a link the "http://" was already

highlighted, so you could just paste in the link you can copied from
the address bar, overlaying the "http://" already there. Now this
"http://" is no longer highlighted, so you have to backspace over it
to wipe it out before or after you paste in the link.

Was this a deliberate change and will it be reverted ?

(Apologies if this is the wrong place for this)

Attachments (1)

select-http-when-linking.diff (599 bytes) - added by markjaquith 6 years ago.
Patch for trunk, highlights http://

Download all attachments as: .zip

Change History (8)

  • Milestone changed from 2.2 to 2.1
  • Priority changed from normal to lowest
  • Severity changed from normal to minor
  • Type changed from defect to enhancement
  • Version set to 2.1

I think you're thinking of when the RTE is off and it's just a standard JS prompt. In 2.0.5, there's nothing in the URL box. ;)

However, this should be easy to do if it's generally agreed that we want this. :)

comment:2   podz6 years ago

In that case I was wrong - it's in 2.1a

  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

+1 for highlighting it. anything that kills paste ability is bad. BUT, we could also check for double http:// or https:// on the backend like so:

$url = preg_replace('|^http(s)?://http(s)?://|', 'http$2://', $url);

I see people doing that ALL the time, so this could be once of those nice "it just works" features. Even with highlighting, people are going to get it wrong sometimes.

Note: this new behavior was introduced to RTE by ticket:2579 (dupl #3192) r4597 a week ago, but that added the 'http://', it was not previously there nor highlighted.

+1 selected

Patch for trunk, highlights http://

  • Keywords has-patch added
  • Owner changed from markjaquith to skeltoac
  • Status changed from assigned to new

Patch uploaded. Seems to work. I'll wait for Andy's +1 on the patch before it goes in, however.

comment:6   andy6 years ago

  • Keywords commit added

Lovely!

comment:7   ryan6 years ago

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

(In [4642]) Select http when linking. Props markjaquith. fixes #3462

Note: See TracTickets for help on using tickets.