Bug #643
closedWInPlaceEdit with disabled buttons
0%
Description
There appears to be a bug when using WInPlaceEdit object with setButtonsEnabled(false).
Test application...
#include <Wt/WText>
#include <Wt/WBreak>
#include <Wt/WApplication>
#include <Wt/WInPlaceEdit>
#include <Wt/WContainerWidget>
using namespace Wt;
class TestApp : public Wt::WApplication {
public:
TestApp(const Wt::WEnvironment& env)
: Wt::WApplication(env)
{
WText* signalIndicator = new WText("<font color=\"red\">Value Change Emitted</font>");
signalIndicator->hide();
signalIndicator->mouseMoved().connect(signalIndicator, &WWidget::hide);
WInPlaceEdit* withButtons = new WInPlaceEdit("With Buttons");
withButtons->valueChanged().connect(signalIndicator, &WWidget::show);
WInPlaceEdit* noButtons = new WInPlaceEdit("No Buttons");
noButtons->valueChanged().connect(signalIndicator, &WWidget::show);
noButtons->setButtonsEnabled(false);
root()->addWidget(withButtons);
root()->addWidget(new WBreak);
root()->addWidget(noButtons);
for(int i=0; i<5; ++i)
root()->addWidget(new WBreak);
root()->addWidget(signalIndicator);
}
};
Wt::WApplication* getApp(const Wt::WEnvironment& e) {
return new TestApp(e);
}
int main(int argc, char** argv) {
return Wt::WRun(argc, argv, &getApp);
}
Server: Deployed with wthttp from Debian machine
Client: Windows 7 - Firefox 3.6.12 / Chrome 8.0.552.215
Issue: When the WInPlaceEdit, used with disabled buttons, is blurred (either by using ESC,Enter,or mouseclick outside the lineEdit), a valueChanged signal is emitted with a following mouseclick or tab key press. If the Enter key is pressed, the signal is emitted (as it should be), but then a following mouseclick will again emit another signal. If the ESC or mouseclick is used to blur the field, then a following mouseclick or tab will emit the signal.
Server: Deployed with wthttp from Debian machine
Client: Windows 7 - IE 8.0
Issue: When the WInPlaceEdit, used with disabled buttons, is blurred (in any manner), a valueChanged signal is emitted. Whenever the field is blurred, in any manner, the signal is emitted.
Test procedure:
//run application
//click on "No Buttons"
//press ESC key -> in IE the signal is emitted
//click empty space in browser window -> in FF / Chrome the signal is emitted
Updated by Koen Deforche over 13 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
Hey Derrek,
Latest git should fix these issues.
Regards,
koen
Updated by Koen Deforche about 13 years ago
- Status changed from Resolved to Closed