Last Comment Bug 783614 - Cutting a sub string from the location bar value can unexpectedly modify the value further
: Cutting a sub string from the location bar value can unexpectedly modify the ...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Location Bar (show other bugs)
: Trunk
: All All
: -- minor (vote)
: Firefox 17
Assigned To: Dão Gottwald [:dao]
:
Mentors:
Depends on:
Blocks: 665580
  Show dependency treegraph
 
Reported: 2012-08-17 11:00 PDT by Alice0775 White
Modified: 2012-08-21 19:59 PDT (History)
6 users (show)
dao+bmo: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.27 KB, patch)
2012-08-17 13:06 PDT, Dão Gottwald [:dao]
bmcbride: review+
Details | Diff | Review
test (1.64 KB, patch)
2012-08-20 10:37 PDT, Dão Gottwald [:dao]
bmcbride: review+
Details | Diff | Review

Description Alice0775 White 2012-08-17 11:00:44 PDT
Build Identifier:
http://hg.mozilla.org/mozilla-central/rev/a79132ac2f05
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120817030555

Step To Reproduce:

1. Load this
2. Select text "s" of https://bugzilla.mozilla.org/...
3. Right click on the locationbar and execute Cut or Ctrl+x

Actual Results:
   Locationbar shows bugzilla.mozilla.org/...
   And caret is between z and i

Expected Results:
   Locationbar should show http://bugzilla.mozilla.org/...
   And the caret should be between p and :

   And protocol scheme should not hide in the editing text in this case
Comment 1 Dão Gottwald [:dao] 2012-08-17 13:06:05 PDT
Created attachment 652887 [details] [diff] [review]
patch
Comment 2 Blair McBride [:Unfocused] (mostly unavailable, needinfo open, reviews not) 2012-08-20 04:52:27 PDT
Comment on attachment 652887 [details] [diff] [review]
patch

Review of attachment 652887 [details] [diff] [review]:
-----------------------------------------------------------------

Code looks good, but it could really do with a test (see browser_bug556061.js).
Comment 3 Dão Gottwald [:dao] 2012-08-20 10:37:51 PDT
Created attachment 653431 [details] [diff] [review]
test
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-08-21 19:11:16 PDT
https://hg.mozilla.org/mozilla-central/rev/62d00e115522
Comment 6 Andreas van dem Helge 2012-08-21 19:52:50 PDT
So now the text copied will be exactly what was selected?

E.g.: URL Bar shows: bugzilla.mozilla.org/show_bug.cgi?id=783614
"bugzilla.mozilla.org/show_bug.cgi?id=783614" is highlighted and copied
Text "bugzilla.mozilla.org/show_bug.cgi?id=783614" will be on the clipboard?

Previously text that had not been highlighted managed to end up in the clipboard.
Comment 7 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-08-21 19:58:30 PDT
No, this bug didn't change that behavior. This fixed a very specific case of cutting a substring of text from the location bar.
Comment 8 Andreas van dem Helge 2012-08-21 19:59:45 PDT
So the cut/copy function in Firefox is still broken. Awesome!

Note You need to log in before you can comment on or make changes to this bug.