Issue metadata
Sign in to add a comment
|
Selections inside text controls should be of type Range (not Caret)
Reported by
hu...@opera.com,
Apr 18 2017
|
||||||||||||||||||||||
Issue description
Chrome Version: 58.0.3029.68 (current beta)
OS: Linux and probably others
What steps will reproduce the problem?
<input value="hey" id="x">
<script>
document.addEventListener("selectionchange", function() {
const selection = getSelection();
console.log("selection changed to " + selection.toString() + "(" + selection.type + ")");
});
document.getElementById("x").select();
</script>
What is the expected result?
"selection changed to hey(Range)"
What happens instead?
"selection changed to hey(Caret)"
This works in 57.0.2987.133 (current stable).
The "Selection API" spec does not specify how to handle ranges in text controls but nevertheless, I assume this change was unintentional.
,
Apr 20 2017
,
Apr 20 2017
I agree that we should fix this.
type isCollapsed
Firefox N/A true
Edge Range true
Safari Range true
Chrome 57 Range true
Chrome 58 Caret true
,
Apr 24 2017
,
Apr 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ddf851a7d72103c0062bebeb3d3af42b9d5b5c6d commit ddf851a7d72103c0062bebeb3d3af42b9d5b5c6d Author: tkent <tkent@chromium.org> Date: Tue Apr 25 08:36:54 2017 Selection API: type attribute should return 'Range' for range-selection in text controls. This fixes a regression since Google Chrome 58. New behavior is compatible with WebKit and Edge. Firefox doesn't have 'type' attribute. Implementation: SelectionTemplate<T>::IsCaret() and IsRange() should take care of granularity. BUG= 712579 Review-Url: https://codereview.chromium.org/2835063002 Cr-Commit-Position: refs/heads/master@{#466927} [modify] https://crrev.com/ddf851a7d72103c0062bebeb3d3af42b9d5b5c6d/third_party/WebKit/LayoutTests/fast/forms/shadow-tree-exposure-expected.txt [modify] https://crrev.com/ddf851a7d72103c0062bebeb3d3af42b9d5b5c6d/third_party/WebKit/LayoutTests/fast/forms/shadow-tree-exposure.html [modify] https://crrev.com/ddf851a7d72103c0062bebeb3d3af42b9d5b5c6d/third_party/WebKit/Source/core/editing/DOMSelection.cpp [modify] https://crrev.com/ddf851a7d72103c0062bebeb3d3af42b9d5b5c6d/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp [modify] https://crrev.com/ddf851a7d72103c0062bebeb3d3af42b9d5b5c6d/third_party/WebKit/Source/core/editing/SelectionTemplate.h
,
Apr 25 2017
,
Apr 26 2017
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5c24f975838b0d961d333f81f66d1c2267dd1d89 commit 5c24f975838b0d961d333f81f66d1c2267dd1d89 Author: Kent Tamura <tkent@chromium.org> Date: Thu Apr 27 01:03:10 2017 Merge "Selection API: type attribute should return 'Range' for range-selection in text controls." to M59 This fixes a regression since Google Chrome 58. New behavior is compatible with WebKit and Edge. Firefox doesn't have 'type' attribute. Implementation: SelectionTemplate<T>::IsCaret() and IsRange() should take care of granularity. BUG= 712579 Review-Url: https://codereview.chromium.org/2835063002 Cr-Commit-Position: refs/heads/master@{#466927} (cherry picked from commit ddf851a7d72103c0062bebeb3d3af42b9d5b5c6d) Review-Url: https://codereview.chromium.org/2840423002 . Cr-Commit-Position: refs/branch-heads/3071@{#249} Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641} [modify] https://crrev.com/5c24f975838b0d961d333f81f66d1c2267dd1d89/third_party/WebKit/LayoutTests/fast/forms/shadow-tree-exposure-expected.txt [modify] https://crrev.com/5c24f975838b0d961d333f81f66d1c2267dd1d89/third_party/WebKit/LayoutTests/fast/forms/shadow-tree-exposure.html [modify] https://crrev.com/5c24f975838b0d961d333f81f66d1c2267dd1d89/third_party/WebKit/Source/core/editing/DOMSelection.cpp [modify] https://crrev.com/5c24f975838b0d961d333f81f66d1c2267dd1d89/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp [modify] https://crrev.com/5c24f975838b0d961d333f81f66d1c2267dd1d89/third_party/WebKit/Source/core/editing/SelectionTemplate.h
,
Apr 28 2017
Kindly let us know in which version of Chrome will get this fixed. We're facing issue with selected text formatting used under Redactor editor. Posted question for same here: http://stackoverflow.com/questions/43674400/redactor-editor-text-format-issues-with-chrome-version-58
,
Apr 28 2017
sandeep.guddu@, Google Chrome 59 will have the fix. However, this bug is for INPUT and TEXTAREA, not contenteditable. If your issue is for contenteditable, please find/file another bug.
,
Apr 28 2017
@tkent, Thanks for update. I think our bug is also related to INPUT and TEXTAREA. Can you please let me know by when Google Chrome 59 will be available for end users. It's very critical issues for our users.
,
Apr 28 2017
#11: The *estimated* stable release date of M59 is June 6 See https://www.chromium.org/developers/calendar
,
Aug 30 2017
Hi, the problem described in http://stackoverflow.com/questions/43674400/redactor-editor-text-format-issues-with-chrome-version-58 still exists in chrome version 60. Has this been fixed? If not, when can be expect it to be fixed? |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by hu...@opera.com
, Apr 19 2017