Closed
Bug 1063266
Opened 10 years ago
Closed 10 years ago
(CopyPaste) the textselection dialog should be repositioned once the content is resized.
Categories
(Firefox OS Graveyard :: Gaia::System, defect, P1)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1067728
2.1 S4 (12sep)
People
(Reporter: gduan, Assigned: TYLin)
References
Details
Attachments
(1 obsolete file)
When click on the input field of the bottom,the keyboard shows and overlap the textselection dialog.
Reporter | ||
Updated•10 years ago
|
Blocks: CopyPasteLegacy
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → gduan
Reporter | ||
Comment 1•10 years ago
|
||
The problem here is, when we resize the window due to keyboard launch, the content would be auto scrolled. So the bubble position would be incorrect.
We need to have ability to calculate the diff of scroll start and end in system app.
Reporter | ||
Comment 2•10 years ago
|
||
I tried to print out all mozbrowserasyncscroll event from appWindow.js. It's only triggered when app is opened and closed and switched instead of scrolling.
Reporter | ||
Updated•10 years ago
|
Target Milestone: --- → 2.1 S4 (12sep)
Reporter | ||
Comment 3•10 years ago
|
||
see https://bugzilla.mozilla.org/show_bug.cgi?id=1020801#c56
we're going to remove mozbrowserasyncscroll...
Reporter | ||
Comment 5•10 years ago
|
||
Yes, this is still a issue.
When keyboard display, all the content will be resized and repositioned, there's proper event to tell me if absolute position of selecting area is changed.
Besides keyboard case, we also need to consider orientation change case.
Flags: needinfo?(gduan)
Reporter | ||
Comment 6•10 years ago
|
||
set ni to Peter.
If we resize the content iframe, like rotate the phone or show/hide keyboard, is there any way to get the latest rect information to update bubble position?
We found below method to get new rect. However, it's controlled in each iframe, and besides, it's have problem when the selection happens in input/textarea dom.
var selection = window.getSelection();
var range = selection.getRange(0);
var rect = range.getBoundingClientRect();
Flags: needinfo?(pchang)
Comment 7•10 years ago
|
||
(In reply to George Duan [:gduan] [:喬智] from comment #6)
> set ni to Peter.
>
> If we resize the content iframe, like rotate the phone or show/hide
> keyboard, is there any way to get the latest rect information to update
> bubble position?
>
> We found below method to get new rect. However, it's controlled in each
> iframe, and besides, it's have problem when the selection happens in
> input/textarea dom.
>
> var selection = window.getSelection();
> var range = selection.getRange(0);
> var rect = range.getBoundingClientRect();
For the input/textarea dom, are you able to get the editor object?
If yes, you can also call 'getSelection' with this editor. If the new rect data is correct, I think we could also pass this new rect to shell.js as the same as scrollviewchange event.
http://dxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/test/browser_dbg_search-autofill-identifier.js#32
Flags: needinfo?(pchang) → needinfo?(gduan)
Reporter | ||
Comment 8•10 years ago
|
||
I can't get meaningful rect information from input/textarea dom.
Flags: needinfo?(gduan)
Reporter | ||
Comment 9•10 years ago
|
||
For not input/textarea case, I can get the selection area information as below:
window.getSelection().getRangeAt(0).getBoundingClientRect()
and the output would contain x/y/width/height/top/right/bottom/left information of the selection area.
However, I can get the position characters I select in input/textarea field by using input.selectionEnd/selectionStart,
and I can also set selection range by using input.setSelectionRange(startPos, endPos).
I find no way to get the rect position of selecting area.
We need a way to get new rect information once the window has been resized or orientation is changed.
Assignee: gduan → nobody
Flags: needinfo?(pchang)
Updated•10 years ago
|
Priority: -- → P1
Updated•10 years ago
|
Assignee: nobody → tlin
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Flags: needinfo?(tlin)
Comment hidden (off-topic) |
Assignee | ||
Updated•10 years ago
|
Attachment #8517270 -
Attachment is obsolete: true
Attachment #8517270 -
Flags: review?(roc)
Comment 12•10 years ago
|
||
TYLin, I think this issue will be fixed in bug 1067728 too.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•