JDK-8215775 : Scrollbars from web pages appear to be absolute, overlapping everything
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u191,openjfx11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86_64
  • Submitted: 2018-12-20
  • Updated: 2021-09-15
  • Resolved: 2019-02-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8u221Fixed openjfx11.0.4Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
Scrollbars stack on top of everything that overlaps. As far as I can assume, the scrollbars rendered in the WebView are absolute, and do not take in consideration everything else from the DOM tree. They also overlap elements from the edge of an overflowing container (i.e. icons, text) if these elements do not have enough padding, instead of making all of the elements shift to the left when the scrollbar appears.

Examples: 
   * Triggering a dropdown, which is in front of a container with a scrollbar in it, the scrollbar will be in front of the content of the dropdown, making it unreadable; 
   * Triggering a modal functionality, the scrollbar will be in front of the overlay from the background

REGRESSION : Last worked in version 8u181

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Open a JavaFX Browser Webview
2. Navigate to a page which has a scrollbar and a conflicting functionality (i.e. Modal, Dropdown overlapping): for example https://mdbootstrap.com/docs/jquery/modals/basic/
3. Trigger this conflicting functionality

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The scrollbar should stay linked to its container, with the corresponding z-index
ACTUAL -
The scrollbar gets in front of everything, with a higher z-index

CUSTOMER SUBMITTED WORKAROUND :
For now, I have hidden the scrollbars from the Front-End when I triggered this conflicting functionality

FREQUENCY : always



Comments
If you run this sample code: " import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.StackPane; import javafx.scene.web.WebEngine; import javafx.scene.web.WebView; import javafx.stage.Stage; public class LoadHtml extends Application { public void start(Stage primaryStage) throws Exception { primaryStage.setTitle(System.getProperty("java.runtime.version")); WebView browser = new WebView(); WebEngine engine = browser.getEngine(); engine.loadContent("<div style=\"text-align: right; height:80%\">test</div>\n" + "<div style=\"text-align: right; height:80%\">test</div>"); StackPane sp = new StackPane(); sp.getChildren().add(browser); Scene scene = new Scene(sp); primaryStage.setScene(scene); primaryStage.show(); } public static void main(String[] args) { launch(args); } } " You will see that the scrollBars are still overlapping the content. Should we reopen this ticket or should I create a new one?
03-08-2021

Changeset: 0ee0cd385816 Author: arajkumar Date: 2019-02-22 15:36 +0530 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/0ee0cd385816 8215775: Scrollbars from web pages appear to be absolute, overlapping everything Reviewed-by: kcr, mbilla
22-02-2019

[~mbilla], [~kcr], Please review the following Github PR, https://github.com/javafxports/openjdk-jfx/pull/349
29-01-2019

It is a regression of JDK-8203698. Reverting a ScrollbarThemeJava.h change fixes the issue, diff --git a/modules/javafx.web/src/main/native/Source/WebCore/platform/java/ScrollbarThemeJava.h b/modules/javafx.web/src/main/native/Source/WebCore/platform/java/ScrollbarThemeJava.h index 85e67555ff6..8ef1aa8568b 100644 --- a/modules/javafx.web/src/main/native/Source/WebCore/platform/java/ScrollbarThemeJava.h +++ b/modules/javafx.web/src/main/native/Source/WebCore/platform/java/ScrollbarThemeJava.h @@ -43,7 +43,7 @@ public: IntRect backButtonRect(Scrollbar&, ScrollbarPart, bool painting = false) override; IntRect forwardButtonRect(Scrollbar&, ScrollbarPart, bool painting = false) override; IntRect trackRect(Scrollbar&, bool painting = false) override; - bool usesOverlayScrollbars() const final { return true; } + bool usesOverlayScrollbars() const final { return false; } }; } // namespace WebCore
17-01-2019

8u191-b01 : Pass 8u191-b02 : Fail openjfx12-ea+4 : Fail Looks due to 606.1 webkit upgrade (JDK-8199474)
21-12-2018