Tapping *below* some <input>s can focus them in Mobile Safari
https://bugs.webkit.org/show_bug.cgi?id=146244
<rdar://problem/
21509310>
Reviewed by Darin Adler.
Source/WebCore:
Removes iOS-specific logic in positionForPointRespectingEditingBoundaries that was causing us to focus inputs by
tapping on the document element. We believe this logic, which causes VisiblePosition finding to recurse from a non-
editable element to an editable child, is not necessary to focus editable elements underneath non-editable elements,
since hit-testing will already have selected the contentEditable element prior to searching for a suitable
VisiblePosition. Further investigation shows that this logic was added to fix <rdar://problem/
5545799>, in which the
first character in a Notes document could not be selected. However, I have not been able to reproduce this bug after
removing this logic.
As a result of this change, we can also enable a WK1 test, editing/selection/click-outside-editable-div.html, that
had also been marked as failing due to positionForPointRespectingEditingBoundaries recursing into a contentEditable
div.
Test: fast/events/ios/clicking-document-should-not-trigger-focus.html
* rendering/RenderBlock.cpp:
(WebCore::positionForPointRespectingEditingBoundaries): Deleted.
LayoutTests:
Enables a now-passing WK1 editing test (editing/selection/click-outside-editable-div.html) and also add a new
WK2 test that verifies an input node won't be focused by clicking anywhere in the document outside of the body.
* fast/events/ios/clicking-document-should-not-trigger-focus-expected.txt: Added.
* fast/events/ios/clicking-document-should-not-trigger-focus.html: Added.
* platform/ios-simulator-wk1/TestExpectations: No longer disable editing/selection/click-outside-editable-div.html.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191954
268f45cc-cd09-0410-ab3c-
d52691b4dbfc