Summary: | Setting input's value to the same value moves caret at end of input | ||
---|---|---|---|
Product: | WebKit | Reporter: | Giovanni Piller Cottrer <giovanni.piller> |
Component: | HTML Editing | Assignee: | Joonghun Park <jh718.park> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | cdumez, changseok, cory, darin, esprehn+autocc, ews-watchlist, gyuyoung.kim, jh718.park, koivisto, megan_gardner, mifenton, rniwa, simon.fraser, webkit-bug-importer, wenson_hsieh |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 12 | ||
Hardware: | Unspecified | ||
OS: | macOS 10.14 | ||
URL: | https://jsfiddle.net/foavjy3n/2/ | ||
Attachments: |
Description
Giovanni Piller Cottrer
2018-11-05 02:37:21 PST
Created attachment 355262 [details]
Patch
Note: patch is supposed to do the same thing as HTMLTextAreaElement::setValueCommon (See lines 384 to 387 of HTMLTextAreaElement.cpp), which is why I used the same comment. Comment on attachment 355262 [details] Patch Attachment 355262 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10076909 New failing tests: editing/input/setting-same-value-on-input-should-not-change-caret-position.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html fast/forms/range/range-set-attribute.html fast/forms/number/number-validity-badinput.html Created attachment 355265 [details]
Archive of layout-test-results from ews102 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 355262 [details] Patch Attachment 355262 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10076935 New failing tests: fast/forms/number/number-validity-badinput.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html fast/forms/range/range-set-attribute.html editing/input/setting-same-value-on-input-should-not-change-caret-position.html Created attachment 355267 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 355262 [details] Patch Attachment 355262 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10077048 New failing tests: editing/input/setting-same-value-on-input-should-not-change-caret-position.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html fast/forms/range/range-set-attribute.html fast/forms/number/number-validity-badinput.html Created attachment 355269 [details]
Archive of layout-test-results from ews112 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 355262 [details] Patch Attachment 355262 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/10077129 New failing tests: editing/input/setting-same-value-on-input-should-not-change-caret-position.html fast/forms/number/number-l10n-input.html fast/forms/range/range-set-attribute.html fast/forms/number/number-validity-badinput.html Created attachment 355270 [details]
Archive of layout-test-results from ews203 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews203 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment on attachment 355262 [details] Patch Attachment 355262 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10076946 New failing tests: editing/input/setting-same-value-on-input-should-not-change-caret-position.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html fast/forms/range/range-set-attribute.html fast/forms/number/number-validity-badinput.html Created attachment 355271 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Sorry for the broken patch. Next time I'll be more cautious. Note: my patch (https://bugs.webkit.org/attachment.cgi?id=355262) is missing a -expected.txt file for the new test. I'm not going to submit a new one just for this, since it would trigger all the testing process. ----------- I'll try to work a bit more on this, but it's clear that I'm missing something. For example: I'm now thinking that the fix should be applied just to TextFieldInputType::setValue, but any approach I take leaves at least these 2 tests failing: imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions.html imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html Try to match the spec as closely as possible : https://html.spec.whatwg.org/#dom-input-value Your current patch seems to bypass work that we are supposed to do as per spec, only the cursor position change is supposed to be impacted. Comment on attachment 355262 [details]
Patch
r- due to the new test failures.
Created attachment 438558 [details]
Submit patch to check layout test result
Created attachment 438571 [details]
patch to check layout test result
Created attachment 438574 [details]
Patch
Could you please review this change? I think this patch is ready for review. Comment on attachment 438574 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438574&action=review > Source/WebCore/ChangeLog:14 > + Reviewed by NOBODY (OOPS!). This line should go below the bug link (with a blank line in between). > LayoutTests/imported/w3c/ChangeLog:14 > + Reviewed by NOBODY (OOPS!). Ditto Comment on attachment 438574 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438574&action=review >> Source/WebCore/ChangeLog:14 >> + Reviewed by NOBODY (OOPS!). > > This line should go below the bug link (with a blank line in between). Ok, I will move this in the next patchset. >> LayoutTests/imported/w3c/ChangeLog:14 >> + Reviewed by NOBODY (OOPS!). > > Ditto Done. Created attachment 438993 [details]
Patch For Landing
Committed r282898 (242026@main): <https://commits.webkit.org/242026@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 438993 [details]. |