Summary: | [Qt] Hitting enter/return doesn't create new list items as in other WebKit ports. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Erik L. Bunce <elbunce> | ||||||
Component: | WebKit Qt | Assignee: | Tor Arne Vestbø <vestbo> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | Keywords: | Qt | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | OS X 10.5 | ||||||||
URL: | http://rtef.info/demo.htm or http://tinymce.moxiecode.com/example_full.php?example=true | ||||||||
Attachments: |
|
Description
Erik L. Bunce
2008-07-27 22:02:00 PDT
Created attachment 22516 [details]
Patch to change VK_RETURN handling from InsertLineBreak to InsertNewline
This should probably be handled in QWebPage::editorActionForKeyEvent(), but might require changes in Qt. I'm looking into it. We also need to make sure we exec InsertLineBreak when the shift modifier is pressed (ctrl on mac). I agree about the Shift / CTRL modifier. Also that long-term a lot of EditorClientQt::handleKeyboardEvent() should be refactored, and that comparison/dispatch using QKeySequence would be a better way to go. However, I'm not sure wholesale moving it to use QWebPage::editorActionForKeyEvent() is the correct solution either, unless you wish to expose most / all of the necessary commands as QWebPage::WebActions. Created attachment 22523 [details]
Improved patch handles Shift + Return properly.
Looking at the sequences in question, making them QPage::WebActions might not be a bad idea. I'd still probably separate the edit vs. 'nav' action lookups. Preliminary patch (requires a > 1. August Qt snapshot): http://code.staikos.net/cgi-bin/gitweb.cgi?p=webkit;a=commitdiff;h=fb313a86b2565637593c8b5b497c28b9ae763b1a Updated patch. This one should build against Qt 4.4 too (by using the approach of patch 22523). Thanks for contributing! http://code.staikos.net/cgi-bin/gitweb.cgi?p=webkit;a=commitdiff;h=7d2f6e54672ca4d0c3fd4541ad59e4f32db981cc Heh, the one correction I'd make is that my name is Erik with a k at the end. ;-) |