Skip to content

Commit 9e145d1

Browse files
committed
Removed IE specific code from WFormWidget
and no longer needed WFormWidget::applyEmptyText function
1 parent 1918f81 commit 9e145d1

File tree

4 files changed

+6
-35
lines changed

4 files changed

+6
-35
lines changed

src/Wt/WFormWidget.C

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ void WFormWidget::setPlaceholderText(const WString& placeholderText)
8585

8686
WApplication* app = WApplication::instance();
8787
const WEnvironment& env = app->environment();
88-
if (!env.agentIsIElt(10) &&
89-
(domElementType() == DomElementType::INPUT || domElementType() == DomElementType::TEXTAREA)) {
88+
if (domElementType() == DomElementType::INPUT || domElementType() == DomElementType::TEXTAREA) {
9089
flags_.set(BIT_PLACEHOLDER_CHANGED);
9190
repaint();
9291
} else {
@@ -157,29 +156,13 @@ void WFormWidget::render(WFlags<RenderFlag> flags)
157156

158157
void WFormWidget::updateEmptyText()
159158
{
160-
WApplication *app = WApplication::instance();
161-
const WEnvironment &env = app->environment();
162-
if (isRendered()) {
163-
if (env.agentIsIElt(10)) {
164-
doJavaScript(jsRef() + ".wtObj"
165-
".setEmptyText(" + emptyText_.jsStringLiteral() + ");");
166-
} else {
167-
if (domElementType() == DomElementType::INPUT || domElementType() == DomElementType::TEXTAREA) {
168-
flags_.set(BIT_PLACEHOLDER_CHANGED);
169-
repaint();
170-
}
171-
}
159+
if (isRendered() &&
160+
(domElementType() == DomElementType::INPUT || domElementType() == DomElementType::TEXTAREA)) {
161+
flags_.set(BIT_PLACEHOLDER_CHANGED);
162+
repaint();
172163
}
173164
}
174165

175-
void WFormWidget::applyEmptyText()
176-
{
177-
WApplication *app = WApplication::instance();
178-
const WEnvironment &env = app->environment();
179-
if (env.agentIsIElt(10) && isRendered() && !emptyText_.empty())
180-
doJavaScript(jsRef() + ".wtObj.applyEmptyText();");
181-
}
182-
183166
void WFormWidget::refresh()
184167
{
185168
if (emptyText_.refresh())
@@ -257,13 +240,7 @@ void WFormWidget::updateDom(DomElement& element, bool all)
257240
if (!all || !isEnabled())
258241
element.setProperty(Wt::Property::Disabled,
259242
isEnabled() ? "false" : "true");
260-
261-
if (!all && isEnabled() && env.agentIsIE()) {
262-
/*
263-
* FIXME: implement a workaround for IE, reenabling a checkbox makes
264-
* the input box loose interactivity.
265-
*/
266-
}
243+
267244
flags_.reset(BIT_ENABLED_CHANGED);
268245
}
269246

src/Wt/WFormWidget.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ class WT_API WFormWidget : public WInteractWidget
160160
// also used in WAbstractToggleButton
161161
static const char *CHANGE_SIGNAL;
162162

163-
void applyEmptyText();
164-
165163
virtual void enableAjax() override;
166164

167165
/*! \internal

src/Wt/WLineEdit.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ void WLineEdit::setText(const WT_USTRING& text)
7070
repaint();
7171

7272
validate();
73-
74-
applyEmptyText();
7573
}
7674
}
7775

src/Wt/WTextArea.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ void WTextArea::setText(const WT_USTRING& text)
4343
repaint();
4444

4545
validate();
46-
47-
applyEmptyText();
4846
}
4947

5048
void WTextArea::setColumns(int columns)

0 commit comments

Comments
 (0)