Closed Bug 894811 Opened 11 years ago Closed 11 years ago

Defect - first character gets dropped when typing into urlbar after opening a new tab

Categories

(Firefox for Metro Graveyard :: App Bar, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwilde, Assigned: ally)

References

Details

(Whiteboard: [preview])

Attachments

(2 files)

Steps to reproduce:
- Press control-t to open a new tab -> cursor put in urlbar
- Character is typed into urlbar. -> first character will be put into urlbar, gets selected.
- Continue typing (because you don't catch that the character is selected). -> first character (which was selected) gets deleted and replaced with new text entered.

Expected result:
First character should not be highlighted and dropped; full text should be entered.

Actual result:
First character of new URL/search is dropped.
Assignee: nobody → jwilde
QA Contact: jbecerra
Attached patch failing testcaseSplinter Review
Assignee: jwilde → nobody
Assignee: nobody → ally
Whiteboard: [preview]
I didnt mess with the paste & go handler. While it sounds like we should pull it, it doesn't actually interact with this code path or this bug, so I am leery of mixing it into this bug. A nice followup item for kamil maybe?

I left the formatting I had to add along the way, to conform to the metro style guide.
Attachment #787225 - Flags: review?(mbrubeck)
Comment on attachment 787225 [details] [diff] [review]
missing edit char

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

Thanks for filing the followup bug 902713 too!
Attachment #787225 - Flags: review?(mbrubeck) → review+
Backed out for causing perma-orange on mochitest-mc tests:

TEST-UNEXPECTED-FAIL | chrome://mochitests/content/metro/browser/metro/base/tests/mochitest/browser_selection_urlbar.js | caret ui active
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/metro/browser/metro/base/tests/mochitest/browser_selection_urlbar.js | runTests: Task failed - Error: Timed out waiting for condition to be true at testCondition@chrome://mochitests/content/metro/browser/metro/base/tests/mochitest/head.js:356
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/metro/browser/metro/base/tests/mochitest/browser_selection_urlbar.js | uncaught exception - NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIEditor.paste] at chrome://browser/content/ContextCommands.js:92
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/metro/browser/metro/base/tests/mochitest/browser_selection_urlbar.js | bug: popup should be showing
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/metro/browser/metro/base/tests/mochitest/browser_selection_urlbar.js | selection enabled
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/metro/browser/metro/base/tests/mochitest/browser_selection_urlbar.js | caret browsing enabled

https://hg.mozilla.org/integration/fx-team/rev/e9e92ac3a89c
I can reproduce the test failures with this patch, but I haven't yet figured out the exact cause.  However, I think this bug may be fixed already by bug 902713, so this patch might not be needed anymore.  Can anyone confirm this?
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: