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)

x86
macOS
defect

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.
Assignee: nobody → gduan
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.
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.
Target Milestone: --- → 2.1 S4 (12sep)
see https://bugzilla.mozilla.org/show_bug.cgi?id=1020801#c56 we're going to remove mozbrowserasyncscroll...
Is this still an issue?
Flags: needinfo?(gduan)
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)
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)
(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)
I can't get meaningful rect information from input/textarea dom.
Flags: needinfo?(gduan)
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)
Priority: -- → P1
pass ni to TY
Flags: needinfo?(pchang) → needinfo?(tlin)
Assignee: nobody → tlin
Status: NEW → ASSIGNED
Flags: needinfo?(tlin)
Depends on: 1094072
Attachment #8517270 - Attachment is obsolete: true
Attachment #8517270 - Flags: review?(roc)
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.

Attachment

General

Created:
Updated:
Size: