Bug 191418 - HTML form validation bubble disappears
Summary: HTML form validation bubble disappears
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-08 03:31 PST by martin_petrov
Modified: 2018-11-10 09:43 PST (History)
9 users (show)

See Also:


Attachments
Patch (47.85 KB, patch)
2018-11-08 14:47 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (47.73 KB, patch)
2018-11-08 15:02 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (52.24 KB, patch)
2018-11-08 15:59 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (52.30 KB, patch)
2018-11-08 16:59 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2 (2.60 MB, application/zip)
2018-11-08 18:33 PST, EWS Watchlist
no flags Details
Patch (52.33 KB, patch)
2018-11-09 08:34 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description martin_petrov 2018-11-08 03:31:41 PST
The bubble is not visible when the invalid form control is scrolled into view.

Example:
https://www.epson.eu/robots-contest#enter
Comment 1 Chris Dumez 2018-11-08 08:53:06 PST
Please provide reproduction steps.
Comment 2 martin_petrov 2018-11-08 10:15:46 PST
Hi,

It appeared on Safari 12.

1. Submit a form with an invalid field which is outside the viewport.
2. The invalid field is scrolled into view.
3. The balloon with the error message is instantly dismissed and cannot be seen.

http://jsfiddle.net/cs4mjyzL/4/

<form>
    <input type=text required>
    <div style="height:100vh"></div>
    <button>Submit</button>
</form>
Comment 3 Chris Dumez 2018-11-08 10:20:37 PST
Ok, I can reproduce with this jsfiddle. I tried to go as far back as WebKit r232000 and the issue was already happening.
Comment 4 Chris Dumez 2018-11-08 10:27:19 PST
1   0x106b242f3 WebKit::WebValidationMessageClient::hideValidationMessage(WebCore::Element const&)
2   0x108d3a7c0 WebCore::FrameView::viewportContentsChanged()
3   0x108d44299 WebCore::FrameView::scrollTo(WebCore::IntPoint const&)
4   0x108deb868 WebCore::ScrollView::setScrollOffset(WebCore::IntPoint const&)
5   0x108deff92 WebCore::ScrollableArea::scrollPositionChanged(WebCore::IntPoint const&)
6   0x108df03aa WebCore::ScrollableArea::setScrollOffsetFromAnimation(WebCore::IntPoint const&)
7   0x108de86c4 WebCore::ScrollAnimator::notifyPositionChanged(WebCore::FloatSize const&)
8   0x107d51172 WebCore::ScrollAnimatorMac::immediateScrollToPosition(WebCore::FloatPoint const&, WebCore::ScrollClamping)
9   0x107d51073 WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation(WebCore::FloatPoint const&, WebCore::ScrollClamping)
10  0x108dea7b7 WebCore::ScrollView::updateScrollbars(WebCore::IntPoint const&)
11  0x108debf0b WebCore::ScrollView::setScrollPosition(WebCore::IntPoint const&)
12  0x108d3641c WebCore::FrameView::setScrollPosition(WebCore::IntPoint const&)
13  0x109087582 WebCore::RenderLayer::scrollRectToVisible(WebCore::LayoutRect const&, bool, WebCore::ScrollRectToVisibleOptions const&)
14  0x109087329 WebCore::RenderLayer::scrollRectToVisible(WebCore::LayoutRect const&, bool, WebCore::ScrollRectToVisibleOptions const&)
15  0x109087329 WebCore::RenderLayer::scrollRectToVisible(WebCore::LayoutRect const&, bool, WebCore::ScrollRectToVisibleOptions const&)
16  0x1090d74f5 WebCore::RenderObject::scrollRectToVisible(WebCore::LayoutRect const&, bool, WebCore::ScrollRectToVisibleOptions const&)
17  0x1089d9de9 WebCore::FrameSelection::revealSelection(WebCore::SelectionRevealMode, WebCore::ScrollAlignment const&, WebCore::RevealExtentOption)
18  0x1089d9142 WebCore::FrameSelection::updateAndRevealSelection(WebCore::AXTextStateChangeIntent const&)
19  0x1089d6a57 WebCore::FrameSelection::appearanceUpdateTimerFired()
20  0x108df8ba9 WebCore::ThreadTimers::sharedTimerFiredInternal()
21  0x108e406df WebCore::timerFired(__CFRunLoopTimer*, void*)
Comment 5 Chris Dumez 2018-11-08 14:47:46 PST
Created attachment 354277 [details]
Patch
Comment 6 Chris Dumez 2018-11-08 15:02:54 PST
Created attachment 354279 [details]
Patch
Comment 7 Simon Fraser (smfr) 2018-11-08 15:46:10 PST
Comment on attachment 354279 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=354279&action=review

> Source/WebCore/html/HTMLFormControlElement.cpp:523
> +    callOnMainThread([this, protectedThis = makeRef(*this)] {

Kinda hokey.
Comment 8 Chris Dumez 2018-11-08 15:59:43 PST
Created attachment 354286 [details]
Patch
Comment 9 Chris Dumez 2018-11-08 16:59:44 PST
Created attachment 354293 [details]
Patch
Comment 10 EWS Watchlist 2018-11-08 18:33:57 PST
Comment on attachment 354293 [details]
Patch

Attachment 354293 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9915900

New failing tests:
fast/forms/validation-messages.html
Comment 11 EWS Watchlist 2018-11-08 18:33:59 PST
Created attachment 354300 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 12 Chris Dumez 2018-11-09 08:34:18 PST
Created attachment 354347 [details]
Patch
Comment 13 WebKit Commit Bot 2018-11-09 09:38:00 PST
Comment on attachment 354347 [details]
Patch

Clearing flags on attachment: 354347

Committed r238038: <https://trac.webkit.org/changeset/238038>
Comment 14 WebKit Commit Bot 2018-11-09 09:38:02 PST
All reviewed patches have been landed.  Closing bug.
Comment 15 Radar WebKit Bug Importer 2018-11-09 09:38:28 PST
<rdar://problem/45946340>
Comment 16 Ryan Haddad 2018-11-10 08:44:26 PST
accessibility/ios-simulator/form-control-validation-message.html is failing on iOS Simulator after this change:
https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Release%20WK2%20(Tests)/r238041%20(862)/results.html
Comment 17 Chris Dumez 2018-11-10 09:43:53 PST
(In reply to Ryan Haddad from comment #16)
> accessibility/ios-simulator/form-control-validation-message.html is failing
> on iOS Simulator after this change:
> https://build.webkit.org/results/
> Apple%20iOS%2012%20Simulator%20Release%20WK2%20(Tests)/r238041%20(862)/
> results.html

<https://trac.webkit.org/changeset/238066>