document designMode does not bring up the keyboard

RESOLVED FIXED

Status

RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: xyuan, Assigned: janjongboom)

Tracking

unspecified
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [label:Keyboard & IME], URL)

Attachments

(3 attachments, 2 obsolete attachments)

If we set the designMode property to 'on', the entire document will be editable. The keyboard doesn't respond to such type of document.

Testcase provided Martijn Wargers [:mw22]:
 - http://people .mozilla.org/~mwargers/tests/contenteditable/designmode.htm
(Reporter)

Updated

6 years ago
See Also: → bug 796365
Whiteboard: [label:Keyboard & IME]
Can we fix this as soon as possible?  It is blocking the release of my app (https://github.com/joshua-s/firetext/).
Another way to set the entire document editable is letting document.designMode = “on”, which can't bring keyboard as well.
Blocks: 737110
Severity: minor → normal
Component: Gaia::System → Gaia::Keyboard
I'll take a look.
Assignee: nobody → janjongboom
Created attachment 796100 [details] [diff] [review]
Gecko patch

Here is a patch
Attachment #796100 - Flags: review?(xyuan)
Created attachment 796102 [details] [review]
Tests
Attachment #796102 - Flags: review?(xyuan)
Will the patch break bug 902168?
Status: NEW → ASSIGNED
Flags: needinfo?(janjongboom)
I don't think so, at least contenteditable kept working for me in both SMS as well as in the tests and I havent seen any messages, but it looks like it could break that yeah. I'll write a test case...
Flags: needinfo?(janjongboom)
I made a mistake in comment 2, and the other way to set the entire document editable should be:
 <body contenteditable>contentEditable</body>
Created attachment 796181 [details] [diff] [review]
gaia_test_case.patch

On b2g-desktop, the following test failed with gecko patch of Comment 4:

1. Apply gaia_test_case.patch to gaia
2. Launch b2g-desktop and open |UI Tests| -> |Empty|
3. Click the content text 'Hello World!', which is editable

Expected: 
The keyboard is launched.

Actual:
The keyboard won't show for the first time, but after open the keyboard with other input field and reproduce the above steps, the keyboard may show.
(Reporter)

Updated

5 years ago
Attachment #796100 - Flags: review?(xyuan)
The bug addressed in Comment 9 has to do with nested iframes (which is what we have in UI tests)... Will take a look.
Created attachment 796568 [details] [diff] [review]
Gecko patch v2

Hi Yuan, the attached patch passes:

* iframe document with designMode=on (tests attached)
* iframe with body contenteditable (bug 902168) (tests attached)
* test case provided in gaia_test_case.patch
Attachment #796100 - Attachment is obsolete: true
Attachment #796568 - Flags: review?(xyuan)
Comment on attachment 796568 [details] [diff] [review]
Gecko patch v2

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

r=me.

Tested on device and b2g-desktop. The patch works fine.
Attachment #796568 - Flags: review?(xyuan) → review+
Comment on attachment 796102 [details] [review]
Tests

r=me. 

I don't actually run the test, but it looks good for me.

And could please also add a test page to UI tests app so that QA can help to verify the bug.
Attachment #796102 - Flags: review?(xyuan) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
Added iframe tests to UI tests, and landed in https://github.com/mozilla-b2g/gaia/commit/53d993416233fd1f5de3976ac49c62f5ddc465af (needs gecko patch to have landed as well to be working of course)
Well done!
Depends on: 910761
https://hg.mozilla.org/mozilla-central/rev/3f1133846836
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(In reply to Jan Jongboom [:janjongboom] from comment #14)
> Added iframe tests to UI tests, and landed in
> https://github.com/mozilla-b2g/gaia/commit/
> 53d993416233fd1f5de3976ac49c62f5ddc465af (needs gecko patch to have landed
> as well to be working of course)

Backed out due to this depends on the Gaia patch of Bug 906096, which is also backed out for new IME framework to land.

revert commit:
6e2767ebb2d34dc1511ce40914c813c7693a0f5c
Was not reopened when backing out...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Created attachment 802180 [details] [review]
Tests (need relanding)
Attachment #796102 - Attachment is obsolete: true
Attachment #802180 - Flags: review+
Relanded in https://github.com/mozilla-b2g/gaia/commit/6054a6230f6c4d5322f15b30c363b25dc186da58
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
Attachment mime type: text/plain → text/x-github-pull-request
See Also: → bug 1144069
You need to log in before you can comment on or make changes to this bug.