[Webkit-unassigned] [Bug 88932] New: scrollIntoViewIfNeeded has no effect for BR element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 12 15:35:53 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=88932
Summary: scrollIntoViewIfNeeded has no effect for BR element
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: matthew at yorba.org
Calling scrollIntoViewIfNeeded has no effect if the calling element is a BR. Here is some example code using Vala and WebKitGtk+:
const string HTML = """
<HTML><BODY contenteditable="true">
Top
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR id='bottom_br' />
<span id='bottom_span'>Bottom</span>
</BODY>""";
WebKit.WebView web_view;
void on_clicked() {
WebKit.DOM.Document document = web_view.get_dom_document();
// Works
document.get_element_by_id("bottom_span").scroll_into_view_if_needed(false);
// Doesn't work
//document.get_element_by_id("bottom_br").scroll_into_view_if_needed(false);
}
void main(string[] args) {
Gtk.init(ref args);
Gtk.Window window = new Gtk.Window();
window.destroy.connect(Gtk.main_quit);
window.set_default_size(300, 200);
Gtk.Box box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
window.add(box);
Gtk.ScrolledWindow scrolled_window = new Gtk.ScrolledWindow(null, null);
box.pack_start(scrolled_window);
web_view = new WebKit.WebView();
web_view.load_string(HTML, "text/html", "UTF8", "");
scrolled_window.add(web_view);
Gtk.Button button = new Gtk.Button();
box.pack_start(button, false, false);
button.label = "Click Me!";
button.clicked.connect(on_clicked);
window.show_all();
Gtk.main();
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list