ギコナビ
Revision | fc6d50ac4dc55233fa400950a1d9b6e21d7111da (tree) |
---|---|
Time | 2007-05-19 14:06:06 |
Author | h677 <h677> |
Commiter | h677 |
フォーカスの外し方をきちんとすることによって、レスポップアップとレスアンカーの問題解消
@@ -70,6 +70,7 @@ end; | ||
70 | 70 | |
71 | 71 | destructor TResPopupBrowser.Destroy; |
72 | 72 | begin |
73 | + Self.Blur; | |
73 | 74 | Self.OnEnter := nil; |
74 | 75 | Self.OnBeforeNavigate2 := nil; |
75 | 76 | Self.OnStatusTextChange := nil; |
@@ -102,7 +103,7 @@ begin | ||
102 | 103 | Result := FChild; |
103 | 104 | end; |
104 | 105 | end else begin |
105 | - FChild := TResPopupBrowser.Create(Self); | |
106 | + FChild := TResPopupBrowser.Create(Self.Owner); | |
106 | 107 | FChild.ParentBrowser := Self; |
107 | 108 | FChild.NavigateBlank(False); |
108 | 109 | FChild.OnEnter := GikoForm.BrowserEnter; |
@@ -175,8 +176,8 @@ begin | ||
175 | 176 | doc.Write('<html><head>'#13#10 + |
176 | 177 | '<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">'#13#10 + |
177 | 178 | '<meta http-equiv="Pragma" content="no-cache">'#13#10 + |
178 | - '<meta http-equiv="Cache-Control" content="no-cache">'#13#10 | |
179 | - + GetBodyStyle(OnlyTitle) + '</head><body>' | |
179 | + '<meta http-equiv="Cache-Control" content="no-cache">'#13#10 + | |
180 | + GetBodyStyle(OnlyTitle) + '</head><body>' | |
180 | 181 | + GetTitle(OnlyTitle) |
181 | 182 | + ADocument + '<a name="bottom"></a></body></html>'); |
182 | 183 |
@@ -237,8 +238,6 @@ begin | ||
237 | 238 | end; |
238 | 239 | |
239 | 240 | procedure TResPopupBrowser.Clear; |
240 | -var | |
241 | - rect: TRect; | |
242 | 241 | begin |
243 | 242 | ChildClear; |
244 | 243 | if (Self.Visible) then begin |
@@ -358,28 +357,10 @@ begin | ||
358 | 357 | end; |
359 | 358 | procedure TResPopupBrowser.Blur; |
360 | 359 | var |
361 | - rect: TRect; | |
360 | + FOleInPlaceActiveObject: IOleInPlaceActiveObject; | |
362 | 361 | begin |
363 | - if ((Self.Document as IHTMLDocument2).activeElement <> nil) then begin | |
364 | - // tH[JXOµ | |
365 | - Windows.GetClientRect(Self.Handle, rect); | |
366 | - if (Self.ParentBrowser <> nil) then begin | |
367 | - (Self.Application as IOleObject).DoVerb(OLEIVERB_DISCARDUNDOSTATE, (* iVerb *) | |
368 | - nil, (* lpMsg *) | |
369 | - Self, (* pActiveSite *) | |
370 | - 0, (* lindex - reserved *) | |
371 | - Self.ParentBrowser.Handle, (* hwndParent *) | |
372 | - rect); (* display rectangle *) | |
373 | - Self.ParentBrowser.Blur; | |
374 | - end else begin | |
375 | - (Self.Application as IOleObject).DoVerb(OLEIVERB_DISCARDUNDOSTATE, (* iVerb *) | |
376 | - nil, (* lpMsg *) | |
377 | - Self, (* pActiveSite *) | |
378 | - 0, (* lindex - reserved *) | |
379 | - GikoForm.ActiveContent.Browser.Handle, (* hwndParent *) | |
380 | - rect); (* display rectangle *) | |
381 | - end; | |
382 | - end; | |
362 | + FOleInPlaceActiveObject := Self.ControlInterface as IOleInPlaceActiveObject; | |
363 | + FOleInPlaceActiveObject.OnFrameWindowActivate(False); | |
383 | 364 | end; |
384 | 365 | |
385 | 366 | initialization |