Closed
Bug 848594
Opened 12 years ago
Closed 12 years ago
Story - Dragging the starting selection monocle to the left in a scrollable text input with selection doesn't work
Categories
(Firefox for Metro Graveyard :: Input, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jimm, Assigned: jimm)
References
()
Details
(Whiteboard: feature=story u=metro_firefox_user c=content_features p=8 [selection][leave-open] status=verified)
Attachments
(3 files, 1 obsolete file)
1.07 KB,
text/html
|
Details | |
7.68 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
5.08 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
STR: 1) press hold a word in the text input in the test case. 2) drag right hand selection monocle out to select text and scroll the input some way to the right. 3) try to drag the left hand monocle to the left to expand the start selection node. result: selection doesn't scroll properly and selected text isn't expanded. we'll likely need new apis to do this right.
Assignee | ||
Comment 1•12 years ago
|
||
This simplifies character advancement which was using content oriented selection routines instead of the easier to work with text input selection indexes. However this doesn't solve the edit scrolling problem. There are a couple problems here: 1) anchor selection advancement - this simply doesn't work. The selection controller has apis in it that request "scroll to anchor region" but the text input seems to be hardwired to keep the focus node visible. So the controller calls don't work. The visual results caused by this conflict are less than stellar. 2) drag focus node to anchor node - strange things currently happen. This may just be a bug in the way I'm using the controller here, not sure. The entire edit resets such that the focus node ends up all the way over on the right boundary. But the monocle is still over on the left, creating a gap between the two. I'm wondering if we could create some sort of a new ui mode to solve this that doesn't involve changing selection in the text input at all. Android has a nice hover magnifier window for their address bar, maybe something like that for restricted text inputs in content.
Assignee | ||
Comment 2•12 years ago
|
||
I'm going to split this patch out to a new bug so I can land it independent of this issue.
Updated•12 years ago
|
Blocks: metrov1it5
Priority: -- → P2
Comment 3•12 years ago
|
||
Separating this out from Bug 851388 to its own Story for inclusion in Iteration #5.
Assignee: nobody → jmathies
No longer blocks: caret-sel
Summary: Dragging the starting selection monocle to the left in a scrollable text input with selection doesn't work → Story - Dragging the starting selection monocle to the left in a scrollable text input with selection doesn't work
Whiteboard: [selection] → feature=story c=firefox_app_bar_and_autocomplete u=metro_firefox_user p=13 [selection]
Assignee | ||
Updated•12 years ago
|
Attachment #727153 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Whiteboard: feature=story c=firefox_app_bar_and_autocomplete u=metro_firefox_user p=13 [selection] → feature=story c=firefox_app_bar_and_autocomplete u=metro_firefox_user p=8 [selection]
Assignee | ||
Comment 4•12 years ago
|
||
Assignee | ||
Comment 5•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 728644 [details] [diff] [review] code reorg This is purely a code re-org, no logic changes.
Attachment #728644 -
Flags: review?(mbrubeck)
Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 728666 [details] [diff] [review] fix This update uses the new html5 interface setSelectionRange to rearrange the anchor and focus selection nodes depending on the direction of the drag. Prior to this patch, I was manipulating the anchor when dragging to the left in ltr languages. However text edits are designed to keep the focus node visible, which conflicted with my requests to scroll to the anchor. With this patch I'm always working on the focus node which avoids these issues. Note, no rush here since we don't want to close this out until it5 has begun.
Attachment #728666 -
Flags: review?(mbrubeck)
Updated•12 years ago
|
Whiteboard: feature=story c=firefox_app_bar_and_autocomplete u=metro_firefox_user p=8 [selection] → feature=story u=metro_firefox_user c=content_features p=8 [selection]
Comment 8•12 years ago
|
||
Comment on attachment 728644 [details] [diff] [review] code reorg Review of attachment 728644 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/metro/base/content/contenthandlers/SelectionHandler.js @@ +625,5 @@ > + * > + * @param the marker currently being manipulated > + * @param aClientPoint the point designating the new start or end > + * position for the selection. > + * @param aAdjustedClientPoint client point adjusted for line height. This aClientPoint is unused. Can you remove it and just pass aAdjustedClientPoint? @@ +650,5 @@ > + // recurring timer to keep the expected selection behavior going as > + // long as the user keeps the monocle out of bounds. > + if (!this._scrollTimer) > + this._scrollTimer = new Util.Timeout(); > + this._setTextEditUpdateInterval(result.speed); While you are here, please move the "if (!this._scrollTimer)" block inside of _setTextEditUpdateInterval -- or into a separate "get scrollTimer" method if you prefer.
Attachment #728644 -
Flags: review?(mbrubeck) → review+
Comment 9•12 years ago
|
||
Comment on attachment 728666 [details] [diff] [review] fix Review of attachment 728666 [details] [diff] [review]: ----------------------------------------------------------------- Just some trivial nits below. ::: browser/metro/base/content/contenthandlers/SelectionHandler.js @@ +877,5 @@ > let selCtrl = this._getSelectController(); > try { > if (aLocation == kSelectionNodeAnchor) { > + let start = this._targetElement.selectionStart == 0 ? > + 0 : this._targetElement.selectionStart - 1; Optional suggestion: I think this might be a little easier to read as: let start = Math.max(this._targetElement.selectionStart - 1, 0); @@ +884,3 @@ > } else { > + let end = this._targetElement.selectionEnd == this._targetElement.textLength ? > + this._targetElement.textLength : this._targetElement.selectionEnd + 1; let end = Math.min(this._targetElement.selectionEnd + 1, this.targetELement.textLength); @@ +895,5 @@ > + }, > + > + _updateInputFocus: function _updateInputFocus(aMarker) { > + try { > + let selCtrl = this._getSelectController(); Nit: Please move this line down below the next statement.
Attachment #728666 -
Flags: review?(mbrubeck) → review+
Assignee | ||
Updated•12 years ago
|
Whiteboard: feature=story u=metro_firefox_user c=content_features p=8 [selection] → feature=story u=metro_firefox_user c=content_features p=8 [selection][leave-open]
Assignee | ||
Comment 10•12 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/12a599069db2 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/6d94c44aa4d2 Thanks for the quick reviews!
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/12a599069db2 https://hg.mozilla.org/mozilla-central/rev/6d94c44aa4d2
Assignee | ||
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 12•12 years ago
|
||
Tested on 2013-03-29 using a Nightly built from http://hg.mozilla.org/mozilla-central/rev/8693d1d4c86d - Tested using the STR in comment #0 and took into account the information in bug 851388. Dragging the monocle to the left in a scrollable text input with selection works now. - Dragging to the left or right, or up and down, selects the text. If there is text past the left or right, it scrolls as it selects. - Monocles are dismissed when touching outside that text area.
Status: RESOLVED → VERIFIED
Whiteboard: feature=story u=metro_firefox_user c=content_features p=8 [selection][leave-open] → feature=story u=metro_firefox_user c=content_features p=8 [selection][leave-open] status=verified
Comment 13•12 years ago
|
||
While verifying bug 858556, I found out this no longer works.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 14•12 years ago
|
||
Please file a fresh regression bug.
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: jbecerra
Assignee | ||
Comment 16•12 years ago
|
||
I went ahead and filed bug 859490. There are a couple of odd things going on here I'd like to look at before it5 closes out.
Comment 17•12 years ago
|
||
Thanks Jim. I've cancelled the request to Juan.
Flags: needinfo?(jbecerra)
Comment 18•12 years ago
|
||
Retested this and found the same issue as Juan which is already posted in bug 867657.
Comment 19•11 years ago
|
||
While testing this for iteration #10 I haven't been able to reproduce the problem described in bug 867657.
Comment 20•11 years ago
|
||
User Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:26.0) Gecko/20100101 Firefox/26.0 Build ID: 20130812030209 Built from http://hg.mozilla.org/mozilla-central/rev/87c1796bc46c WFM Tested on windows 8 using latest nightly for iteration-11. Followed steps provided in comment0 and got expected result.
Comment 21•11 years ago
|
||
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 Build ID: 20130825030201 Built from http://hg.mozilla.org/mozilla-central/rev/01576441bdc6 WFM Tested on windows 8 using latest nightly for iteration-12. Followed steps provided in comment0 and got expected result.
Status: RESOLVED → VERIFIED
Updated•10 years ago
|
OS: Windows 8 Metro → Windows 8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•