RESOLVED FIXED201632
[Win][WK2] Pressing space key on text input form scrolls the page
https://bugs.webkit.org/show_bug.cgi?id=201632
Summary [Win][WK2] Pressing space key on text input form scrolls the page
Fujii Hironori
Reported 2019-09-09 22:22:12 PDT
Created attachment 378442 [details] test case [Win][WK2] Pressing space key sometimes inputs space character, but scrolling the page otherwise 1. Start Windows WK2 MiniBrowser 2. Open test page 3. Hitting space key repeatedly Expected: space characters should be input consistently Actual: Sometimes page scrolling happens.
Attachments
test case (107 bytes, text/html)
2019-09-09 22:22 PDT, Fujii Hironori
no flags
test case (130 bytes, text/html)
2019-09-10 19:47 PDT, Fujii Hironori
no flags
Patch (2.27 KB, patch)
2020-01-20 22:29 PST, Fujii Hironori
ross.kirsling: review+
Fujii Hironori
Comment 1 2019-09-09 22:26:13 PDT
Fujii Hironori
Comment 2 2019-09-10 19:47:44 PDT
Created attachment 378532 [details] test case
Fujii Hironori
Comment 3 2019-09-10 19:48:41 PDT
scrolling happens every time.
Fujii Hironori
Comment 4 2019-09-10 23:15:43 PDT
In Windows, key events are mapped as following: WM_KEYDOWN → WebEvent::RawKeyDown WM_KEYUP → WebEvent::KeyUp WM_CHAR → WebEvent::Char On the other hand, other ports are using only two types: WebEvent::KeyDown WebEvent::KeyUp
Fujii Hironori
Comment 5 2019-09-10 23:19:44 PDT
In GTK port, WebEvent::KeyDown are converted to keydown and keypress DOM events. And, keypress event are comsumed in WebEditorClient::handleKeyboardEvent. Then, WebPage::performDefaultBehaviorForKeyEvent is not called because it is consumed.
Fujii Hironori
Comment 6 2019-09-11 01:01:19 PDT
See also: Bug 56612 – Web page shouldn't swallow alt-key combinations on Windows Bug 43665 – Delete key doesn't go Back in WebKit2 windows
Fujii Hironori
Comment 7 2020-01-20 21:02:57 PST
After I implemented the logic preventing keypress event if the preceding keydown event is canceled, space characters can't be input anymore in WinCairo WK2. Bug 204694 – [Win] Retrieve all following WM_CHAR events at the beginning of processing WM_KEYDOWN event
Fujii Hironori
Comment 8 2020-01-20 22:29:46 PST
Fujii Hironori
Comment 9 2020-01-21 17:56:22 PST
Radar WebKit Bug Importer
Comment 10 2020-01-21 17:57:12 PST
Note You need to log in before you can comment on or make changes to this bug.