Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Text field bug
Forum Update on Tuesday, May 27th 2025

Text field bug

Scheduled Pinned Locked Moved Qt WebKit
1 Posts 1 Posters 701 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sahara108
    wrote on 15 Apr 2013, 12:38 last edited by
    #1

    Hi,
    I have a simple web view which contains a button and a hidden text field. When double click the button, the text field will show up, allow user to edit button text. Click outside the text field to end editing.
    Here is the javascript code:
    @function doubleClick() {
    var oldValue = button.text();
    editText.css("display", block);
    editText.focus();
    editText.val(oldValue); //***
    }

    editText.delegate('#edit_text_hide').focusout(function(event) {
    var newValue = editText.val();
    button.text(newValue);
    editText.css("display", none);
    alert('finish editing');
    }@
    The code works well in browser but not for QWebview. Whenever I double click on the button, it will show alert "finish editing". I found the problem is this line @editText.val(oldValue)@. It will calls the delegate focusout and make the button can't be editable. Is it a bug of QtWebkit ???
    OS is window 7, Qt version is 5.0.2.

    1 Reply Last reply
    0

    1/1

    15 Apr 2013, 12:38

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved